Eugeneo
Joined: 30 Aug 2005 Posts: 155 Location: Calgary, AB
|
fast pin clocking |
Posted: Tue Dec 30, 2014 9:27 pm |
|
|
Hey guys,
If you need to pulse a pin on a PIC24 at FOSC/2 for a x number of cycles.
I used this to update my LCD through a 8 bit Flash bus. Very fast and effective!
Code: |
// make sure you set the tris register for output on these pins
// you can pre set the values for output so they are not in sync
#asm
MOV #0b0100000001000000, W0 // alternate ONLY the these pins
repeat #0xFFF // pulse pins 4095 + 1 times
XOR 0x02E8 // port g
#endasm
|
|
|