For a 4Mhz timing at 9600 baud Register settings RCSTA = $90 ' Enable serial port & continuous receive TXSTA = $20 ' Enable transmit, BRGH = 0 SPBRG = 25 ' 9600 Baud @ 0.16%...
Your serial circuit diagram/connection details would help - what is connected to the TX line ? Is it just TX that is the problem ? have you tried RXing ? Have you tried lower rates ? Do you...
Yes 4Megs Crystal
By Xtal, do you mean that an external 4Mhz crystal with two caps like 22pf?
I have ..... Still intermittent coms 🙄
Try adding DEFINE HSER_CLROERR 1
Hi All Attempting to get some serial communication working with a 16f628 (4Meg Xtal) My defines are as below :- DEFINE OSC 4 DEFINE HSER_TXSTA 24h DEFINE HSER_RCSTA 90h DEFINE HSER_BAUD...
That code gets 16 samples not 10. You just have to limit the samples from 16 to 5. But this is not very useful. Leave it as it is for ironing out the noise or parasites in the signal. Ioannis
Hi ! Me, again :) Please, how to addapt Melanie's great pice of code (post#^6) for only 5 readed values, not 10 ? Thanks !
I prefer the inductor on the +Vdd side. Anyway, I'd suggest get 10 or more samples in an array, then sort them in order and keep the middle 5 values. Then add them together and divide by 5. ...
Re: Hserout questions
For a 4Mhz timing at 9600 baud
Scampy Today, 11:50Register settings
RCSTA = $90 ' Enable serial port & continuous receive
TXSTA = $20 ' Enable transmit, BRGH = 0
SPBRG = 25 ' 9600 Baud @ 0.16%...