Help interfacing LCD

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
Post Reply
foo_plinger
Posts: 7
Joined: Thu May 14, 2009 10:55 am

Help interfacing LCD

Post by foo_plinger »

I had dropped this project in frustration a few months back, but I am now working on it again. I have the router working, playing playlists, controllable from the cmd line, with the serial pins outputting the display information to my pc via hyperterm.
When I connect my LCD though, all I get is Jeff's 3 message start up
MightyOhmEngineering
Jeff Keyzer cc-sa-3.0 2009
Wifi Radio mightyohm.com


No matter how I have tried to hook it up, with the ISP programmer or not, with the pot control or not, nothing changes the text on the lcd. I know the router is putting it out, because I can connect to my hyperterm and see it.

Any ideas where to start this?
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Help interfacing LCD

Post by mightyohm »

Sorry to hear you dropped the project for a while. :cry:

I'm going to guess that there is problem with the serial comms between the LCD display and the router.

Here is what the AVR is doing when you first power it on.

It initializes the serial port and sends "AVR Online" to the router. I actually forgot that I left this in the code, but the router should ignore it. However, you can use it as a troubleshooting tool to make sure that the AVR is outputting serial data, and also that the router is receiving it.

Then the AVR initializes the LCD display and prints the messages you are seeing.

Then the AVR will sit and wait until it receives the string "AVR Start!" from the router at 9600 baud. This is how I keep the AVR from trying to communicate with the router before the router is ready to receive data, that is, running the interface.sh script.

Once interface.sh is running on the router and the AVR Start command is received by the AVR, the AVR should send a "tuner: #" string back to the router. The interface.sh script waits to get this string so it knows what station in the playlist to start playing.

Once mpd has started playing a stream, the display2.sh script will start sending "Name: ..." and "Title: ..." strings to the AVR. The AVR, assuming it recognizes these strings, will then print the stream name and artist/title info on the LCD.

So you can see there is a lot of stuff that needs to happen before you will see anything printed on the LCD. One thing that will definitely NOT work is trying to use the AVR code you are running with the original display.sh script that shows up earlier in the tutorial. The code you are running (the one that displays the MightyOhm Engineering message) needs to be used with the interface.sh script, which calls display2.sh (not display.sh). The interface.sh script has the routine that tells the AVR to start outputting tuner data. If the AVR doesn't get that start signal it will just keep waiting for it forever.
foo_plinger
Posts: 7
Joined: Thu May 14, 2009 10:55 am

Re: Help interfacing LCD

Post by foo_plinger »

Can you (or anyone) elaborate on how I would check from the router for this AVR message?
It initializes the serial port and sends "AVR Online" to the router. I actually forgot that I left this in the code, but the router should ignore it. However, you can use it as a troubleshooting tool to make sure that the AVR is outputting serial data, and also that the router is receiving it.
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Help interfacing LCD

Post by mightyohm »

try "echo < /dev/tts/0"
Post Reply