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.
...
Yes, the LATD.1 = 1 has to be set as there is no telling what state it was left in after the preceding OWOUT command.
Dave - 13th February 2019, 15:08won't statement HIGH DIGIT1(2) set HIGH the port number, stored in DIGIT1(2) ?
CuriousOne - 13th February 2019, 14:29Excellent!
now it works!
so it was latd/trisd issue as I guess...
Within PBP you can manually manipulate SFRs, read and write to UART registers, etc. If the PIC you are using has EEPROM, you can set up an array of sequential EEPROM addresses with SFR settings. It...
mpgmike - 12th February 2019, 16:34
Re: Hserout questions
I have ..... Still intermittent coms 🙄
andybarrett1 Yesterday, 22:52