Page 1 of 1

Pulse on Port B

Posted: Thu Feb 14, 2008 1:19 pm
by MIKE_31
Hi all,

I want to simulate Push Button with a PIC and control it by RS232.(Letter 'A' shall put the Bit 2 of port B to low during 200ms)
In attached below you can see an extract of by file.
My problem is that the delay of 200ms is not respected.
If i send quickly Letter 'A' the delay is shorter than 200ms ?? Why ?
PIC seems to trigger with the receiver of RS232 and can't wait 200 ms


MIKE

Re: Pulse on Port B

Posted: Thu Feb 14, 2008 5:10 pm
by Benj
Hello Mike

Your program is configured to use the RC oscillator. I beleive that you are meant to be using the PIC with a 3.27MHz crystal. Try switching the hardware and software configurations over to XTAL and you should see the 200ms delay working correctly.

This is done in Flowcode by using the Chip -> Configure menu.

This is done on the hardware by switching the Oscillator select switch over from RC to XTAL.