Interrupt Or I Am Going To Die


Closed Thread
Results 1 to 27 of 27

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Hi Kunguz,

    In your code, which you said works, how did you get "HIGH PORTA" or "LOW PORTA" work?


    ?


    -------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  2. #2
    kunguz's Avatar
    kunguz Guest


    Did you find this post helpful? Yes | No

    Thumbs up Just Works

    May be it's about my IDE ; I am using PROTON SE 1.1.2.8 ,And you can find the working circuit in the attachment with assembly and PICBASIC codes in it.
    Attached Files Attached Files

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Certainely not an IDE problem There's few things in the world want to stay away of. Proton is one of these
    Last edited by mister_e; - 30th October 2006 at 03:35.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Mar 2005
    Posts
    5


    Did you find this post helpful? Yes | No

    Default Interrupt Or I Am Going To Die

    DEFINE LOADER_USED 1
    INCLUDE "modedefs.bas"
    DEFINE HSER_BAUD 9600
    DEFINE HSER_SPBRG 25 'Gebruik deze twee defines 25
    dEFINE HSER_TXSTA 24h 'voor HSER met 9600 Baud
    OPTION_REG = $7f ' Enable PORTB pullups
    ADCON1 = 7 ' Make PORTA and PORTE digital
    on interrupt goto myint
    INTCON = $88
    pause 50
    TRISB = %11110000
    led var portb.0

    start:
    pause 5
    goto start
    '***Start interruptroutine***
    disable
    myint:

    high led
    pause 500
    low led
    INTCON.0=0 'Clear interruptflag
    resume
    enable
    end

  5. #5
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Hi paulvits,

    As you can see Kunguz is all fine. He did not die.

    What is your question?


    -----------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  6. #6
    kunguz's Avatar
    kunguz Guest


    Did you find this post helpful? Yes | No

    Lightbulb Hope this is a solution

    Hi Paulvits ; first of all never use pause or a delay in interrupt ; I don't know why but it makes the chip return from an interrupt with a long time. Really really long. And before intcon.0 = 0 use this line; "MOVF PORTB, W" And let the magic happen .Remove PORTB and write down your interrupt port that's all ,Thanks steven and others I learned this with their helps

  7. #7


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by mister_e
    Certainely not an IDE problem There's few things in the world want to stay away of. Proton is one of these
    They said the same thing about planes in the early days of flight. Sometimes progress takes a while to catch on.

    ---> picnaut

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Talking

    Hey Picnaut

    Why i had this feeling you couldn't resist to add your spices?

    Are you saying we can fly? Really? Wohooo i missed it?

    Is that also true that a man walked on the moon?

    Sometimes progress takes a while to catch on.
    I'm to old to wait 'till it's going to be at least good... if the day come.

    There's a far better tool (not toy) comming up soon. Too bad only for 18Fs... 'till now. Even in pre-release it's already 1E10,000 : 1 better than this Programmer Disaster Software.

    Happy for you that you finnaly get your multi I2CBUS. 2 year later but you have it now. That's true, progress takes a while to catch on.
    Last edited by mister_e; - 1st November 2006 at 05:08.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9


    Did you find this post helpful? Yes | No

    Unhappy Swordfish?

    Hi Mister E,

    Are you talking about Swordfish?
    If so, it does look cool.

    Unfortunately, I've begun to realize that, as a rule, virtually no one in industry takes Basic languages seriously - procedural or not.
    So, unless you are purely a hobbyist or are planning on working 100% for yourself (and never for "the man"), a serious embedded engineer needs to learn C. It's sad, but true. Employers look for C (primarily) and assembly (is a plus).
    It's frustrating but it's a reality, at least in North America.
    I defy anyone to find one company in the States or Canada that's looking for basic programmers! I'll bet that there aren't any.



    Anyway, I don't mean to rant, but I've been frustrated by this lately.
    So, I've bought some C books and dug my old notes out.
    Basic has served me well (PBP and PDS) and has gotten me very comfortable with PICs, but it's on to the next level.

    Cheers!
    ---> picnaut

  10. #10
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    C is a totally different approach. All language will do the job.

    I also use C is some case. But 95% of what i do use BASIC (structured or not) + asm.

    One reason why C is comming more and more popular on some forums is because it's too easy to find some crack/patch to remove the 30 Days Trial limitations. You already know, most serious C compiler pricing are much higher than Basic. You'll never find something really good covering ALL (most) PIC familly under 1,000$

    I have nothing against C. It's a really nice and powerfull language. That what i learned at university... when i was young. C for programming is probably the same a Snap-On tool for mechanics... kind of

    BTW, everybody knows that whatever you use, the guy/girl back to the keyboard make difference.

    You can change your car transmission with a wise grip if you want

    Good luck and don't give up. It really worth to know more programming language.

    PS: I would never be a compiler developper... Microchip release too much different PIC model and familly /day/month/years. You have to be a huge team and have all of those PIC to double check what you do. Tedious job.
    Last edited by mister_e; - 1st November 2006 at 05:48.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Won't go back to SLEEP after 1st Interrupt
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 29th June 2009, 09:00
  2. Can't ID interrupt source with this IntHandler??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd June 2009, 02:35
  3. Help with Analog Interrupt
    By brid0030 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 18:14
  4. NEWBIE: Some basic questions using interrupts
    By JackPollack in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 8th March 2006, 02:59
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts