PDA

View Full Version : serin2



n0yox
- 9th March 2008, 06:40
I am using a 16f628A with the internal oscillator. I am trying you use this simple code with a wireless receiver "RWS-434". If you hold porta.2 low it will timeout every two seconds and my led will flash. If I hook up the receiver or hold Porta.2 high It will never time out the led stays on forever. Can anyone offer an easy cure for this? "Hardware or software"

CMCON = 7
VAR1 VAR WORD
VAR2 VAR WORD
VAR3 VAR WORD

OVER:

LOW PORTA.1 'LED
PAUSE 100
HIGH PORTA.1 'LED

SERIN2 PORTA.2,17197,2000,OVER,[wait(53),VAR1,VAR2,VAR3]

GOTO OVER

skimask
- 9th March 2008, 06:53
I am using a 16f628A with the internal oscillator.
First problem right there. Internal oscillator probably not accurate enough to be using with any sort of serial transmission over wired or wireless.


I am trying you use this simple code with a wireless receiver "RWS-434".
I'm looking at my magic crystal ball and it's telling me that you should go to www.rentron.com and read...then read some more...then when you're done with that, read it all again, wash, lather, rinse, repeat.


If you hold porta.2 low it will timeout every two seconds and my led will flash. If I hook up the receiver or hold Porta.2 high It will never time out the led stays on forever. Can anyone offer an easy cure for this? "Hardware or software"
Try this...again, read it, then read it again...
http://www.picbasic.co.uk/forum/showthread.php?t=1944&highlight=serial+timeout+idle+high

n0yox
- 9th March 2008, 17:03
First problem right there. Internal oscillator probably not accurate enough to be using with any sort of serial transmission over wired or wireless.

I'm looking at my magic crystal ball and it's telling me that you should go to www.rentron.com and read...then read some more...then when you're done with that, read it all again, wash, lather, rinse, repeat.

Try this...again, read it, then read it again...
http://www.picbasic.co.uk/forum/showthread.php?t=1944&highlight=serial+timeout+idle+high


I am sure an external oscillator would be better however I don't have space for it. My project seems to work very well, I just have this little problem with program flow.

Thank You for your report from the other side! I have read several pages about this subject with no definitive answer "that I could see".

This link is very helpful! I have hope one of these solutions will be a fix for my problem. I would guess a mode change will fix my problem when pulled high using a resistor. I know my receiver has spikes when I look at the output with a scope so I'm thinking a mode change will not fix what is most likely a receiver problem.I assumed the "timeout" would be based on not receiving my qualifying character, I was wrong.

I would like to Thank You for your efforts and help!