Skimask - it is a 628 - not 628A.
Mike - I'll look into your comments and get back. Thanks!
Skimask - it is a 628 - not 628A.
Mike - I'll look into your comments and get back. Thanks!
I would never bet on the reliability of SEROUT @9600 baud @ 4MHz... manual says black on white that you should use higher speed crystal. Try DEBUG/DEBUGIN.
Better if you use the INTERNAL USART with hserin/hserout...
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Well, don't ask me to explain it, but moving TX and RX connections to B.6 and B.7 solved my problem. I tried A.0 & A.1 and B.0 and B.1 and nothing. B.6 & B.7 works just fine... I would be interested if anyone could explain that one! ...
I didn't want to use HSERIN and HSEROUT as the manual says the I need to use a MAX232. Trying to keep cost and size down.
But as usual, thanks to all that offered input!
I can understand that you need to keep the cost down, but be aware that - while it may work 90% of the time, the output of the PIC does not meet RS-232 specs. I have occasionally come across computers that would not respond to the PIC's output. Running without a level shifter is OK in the lab, but I wouldn't recommend that you produce a commercial product that way.
Charles Linquist
Not all pins are created equal. On the 16F628 RA0 and RA1 are ST "Schmitt Trigger"
type buffers.
If the RX pin isn't seeing 0.8 * Vdd (around 4V with Vdd = 5), it wont see high enough
signal levels when receiving serial data. This can also be affected by external capacitance.
I.E. even with a TTL type input, external capacitance on the pin can degrade the serial
data to where it fails.
One the16F876A RA0 and RA1 are TTL buffer types, and the incoming signal only needs to
swing from ~2V to ground.
For reliability, like mister_e already mentioned, you definitely should go with a >4MHz osc
if you're using 9600 or greater.
PIC16F88 would be a better choice, internal osc can run up to 8MHz AND you can fine-tune it... for what it worth as it's an RC osc![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
The saga continues...
For a new design, I am using a PIC16F877A and trying to communicate serially with this same MP3 player - essentially running the same code that I had on the 628. You will recall that I "solved" my problem with the 628 design by moving my serial RX an TX pins from PORTA.0 and A.1 to B.6 and B.7. Bruce explained that my problem was due to A.0 and A.1 being Schmitt Trigger (ST) type buffers instead of TTL. I am assuming that what he is implying is that if your pin is a ST, you can not use it for serial communication. Is that correct?
For my new design on the 877a, I had intended to use pins E.1 and E.2 for communication but, alas, they are ST... I tried moving the serial comm to pins A.2 and A.3 which are TTL and still do not seem to be able to talk to the player. Right now, I am not using a MAX232, just going straight from the PIC pins to the TX and RX pins on the player - just as I am doing with the 628 design. It works on that board, but not on the 877. BTW, I am running both at 20 mHz.
Can anyone shed some light on this?
Thanks!
Bookmarks