Help implementing SNES Controller + PIC1F887


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Sep 2010
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    Oh wow, I feel so stupid, but I've just solved my own problem. Undervolting the shift-register inside of the controller by a half volt was enough to cause it to freak out giving me incomplete output, my code now works as expected and everything is working great.

    Thanks for the help, and, if you wouldn't mind, could you elaborate a bit on what you meant by the PortB interrupt, I've done very little with interrupts and don't quite get what you mean.

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


    Did you find this post helpful? Yes | No

    Default

    Glad it is working.

    PORTB has an interrupt on change. When the state of PORTB.0 changes an interrupt can be triggered.

    An example would be counting parts on a conveyor. The MCU can be off doing something else like sending data to a display while a sensor/switch is activated as a part passes by. Then when the MCU is finished with the display the part count can be increases.
    That is using PBP interrupts. If you go with ASM or Darrel Taylor's instant interrupts then the trigger is instantly. But you still need a certain amount of time for everything to happen.

    Either way, you do not need to loop back and check the state of the pin, it happens for you in the background.
    Dave
    Always wear safety glasses while programming.

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