12f675_fuse_about_to_blow!


Closed Thread
Results 1 to 40 of 929

Hybrid View

  1. #1
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Thanks for that rmteo.

    I'll bear that in mind. Don't forget I'm very new to this, sure I'll have to learn all about interrupts at sometime (maybe now is that time).

    I'll be very interested in hearing where mackrackit, Henrik and Joe S think I should go next as they have an understanding on where my knowledge base (or lack of it) lies.

    Hey I couldn't turn an LED on a Month ago!

    Cheers.

    Dave

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Henrik,
    Thanks for finishing that lesson, I got busy.

    rmteo,
    Good point about ASM interrupts. I am not sure if Dave can do that with the demo version. But when he gets the full version...

    Dave,
    We are not finished with PBP interrupts yet
    As you saw things can move pretty fast with the hardware and if you want to have an event happen at a certain time no matter what an interrupt can help.

    Many times it is not recommended to use PAUSEes because as you now know they block other things from happening. There are enough things that do this without adding more, but sometimes we have to use them. Every thing in its place.

    Now try something like this...
    Do a "MAIN_LOOP" that will TOGGLE a LED with a button press. Every time you press a button the LED changes state.

    Then make a BYTE size variable and add the PBP interrupt routine for another LED. The new variable will increment a value of 1 every time the interrupt "triggers".

    After a given amount of "trigger", the variable reaches 10 the second LED changes state.

    This should happen whether the first LED and button has been activated or not.
    By having the variable increment to change the second LED state you can now make it blink at any time frame you want.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    It may be worth pointing out that one does not need to use ASM to use interrupts. I have (and use) 3 different versions/dialects of BASIC for PIC's and they all handle interrupts (including vectored interrupts) without having to delve into ASM. Same situation with C.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rmteo View Post
    It may be worth pointing out that one does not need to use ASM to use interrupts. I have (and use) 3 different versions/dialects of BASIC for PIC's and they all handle interrupts (including vectored interrupts) without having to delve into ASM. Same situation with C.
    But this is a PBP forum... So the point is???
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Gulp, I'm on it.

    I'm probably going to go quiet for a while trying to figure this one out. I'll give it my best shot though.

    I suspect you and Henrik could code it in about five minutes!

    Then again I'm not you or Henrik..... :-)

    Dave

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I suspect you and Henrik could code it in about five minutes!
    Maybe I can now... 15 years ago would be a different story.

    You are doing great! Keep at it!

    Oh, forgot to mention the assignment is due Friday
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Smile

    Hi everyone.

    I've been busy on the 'assignment'.

    I've got the first part going namely:
    Do a "MAIN_LOOP" that will TOGGLE a LED with a button press. Every time you press a button the LED changes state.
    I built a test circuit which I made a small mistake on, then having zero programming confidence quickly convinced myself I'd made a code error, turned out I'd soldered a link into the wrong place (hours wasted), grrrr.

    So on my PIC12F683 GPIO.5 has a push button attached which changes an the state of an LED on GPIO.0 everytime it's pressed, so far so good, now for the tricky part....!

    It's taking longer than expected so my homework may not been handed in until Monday.

    Still, only 14 Years and 48 weeks to catch up with you mackrackit!

    Dave
    Last edited by LEDave; - 24th March 2010 at 23:59.

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