Asynchronous serial + my LCD
= Match not made in heaven! So every Friday, I break out my heart backplane board and we have currently been trying to figure out what in the world is wrong with the LCD portion of the project. The voltage/current provided is correct, the code works on the Activity Board, and the LCD itself works as it should.
So why, when I put it on my board is it not working? The LCD often chirps and shows just a cursor, and occasionally if lucky, a letter or two in a completely random spot.
So @wireengineer changed the code a bit, added some troubleshooting checks, and still, it worked on the Propeller Activity Board but not mine. Meanwhile, the LEDs and pulse simulator are working just fine. Then he notices that the clock is RCFAST, which is different from using a crystal.
RCFAST is an internal oscillator to the propeller which can run from 8-20MHz but averages around 12MHz. The drift though is apparently enough so that communication between the Propeller and the LCD is asynchronous as opposed to synchronous serial. So the clock may be drifting around and bits may miss being sent or read.
This means ideally, I'd have a crystal on my heart board. But! I already have a whole bunch of my boards made up already. So what are my options? From what I remember of our discussions:
1) Discard the LCD portion, and just make it a sound and pulse simulator
2) Reprogram the LCD to be I2C and send it the clock and data information instead of letting it run on its own clock. This would require two more pins.
3) Reprogram the LCD to be able to handle super slow baud rates and it shouldn't be a problem (except it'd only work with my LCD)
4) Recalibrate RCFast or the serial LCD microcontroller. I don't know how to do this :p.
5) Make a new backpack (module to attach to the LCD) that "auto detects the fractional baud rate you're running at or switch to a synchronous protocol" - also something I don't know how to do, though I wouldn't be past learning!
6) Make a case for this where it lights up an LED by the specific rhythm each time the button is pressed.
1 and 6 are the easiest options, but I'd like to know what people think. If I end up designing a new serial backpack for this board, I'd become (I feel) an expert on LCD boards and manipulation of it, but I'd also take a LOT longer to get this board out. Or I might be able to release just the sound/audio first and then worry about LCD later?
What do you think?
@atdiy/@tymkrs
EDIT: Some additional information courtesy of @wireengineer
Q: Checked out more info on the LCD: http://learn.parallax.com/KickStart/27977 Says: "Selectable asynchronous serial baud rates: 2400, 9600.."
A: Yep and the problem is your prop is putting out 9822 bps instead of 9600 due to the RC osc.
Q: If the issue was that we were sending asynchronous serial, but it works with that in its baud, then what's the actual problem?
A: The RC oscillator is not calibrated and can be anywhere between 8 and 20MHz. So your baud rate can be between 5568 and 13632.












