PDA

View Full Version : How long a pause needed between port ops



Sigmanut
- 3rd April 2009, 19:05
How long of a delay should it take to make one led stay on when another is turned on as below

PICkit 2
pic16f690
PBP with MPLAB

LED_power var PORTC.0 ' Alias PORTC.0 to LED for power incicator
LED_shift var PORTC.1 ' led for Shift clock
LED_DI var PORTC.2 ' led for DI
LED_done var PORTC.3 ' led for Finished with changes
trisc = %00000000

high led_power
pause 1000
HIGH LED_SHIFT
pause 1000
HIGH LED_done

Darrel Taylor
- 3rd April 2009, 22:41
The delay only determines how fast each one turns on.

To get them to stay on, you'll need to turn off the Analog functions.


ANSEL = 0
ANSELH = 0

Sigmanut
- 3rd April 2009, 23:57
Your a hero for me. I struggled with this for awhile and found the forum thread about putting a PAUSE 1 in the code because of the read/update/write. So I included the code thinking that I might be leaving something out. Thanks...........