Author Topic: SPI UART I2C & Using Salvaged Components  (Read 5844 times)

0 Members and 1 Guest are viewing this topic.

Offline otpowellTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
SPI UART I2C & Using Salvaged Components
« on: March 19, 2015, 01:53:21 pm »
Hello all, I'm a sophomore in the EE program and haven't learned about the serial protocols yet.  I try to teach myself as much as I can and get into this from a hobby point of view too.  What are some good sources to learn about the different serial communications?  Also, I pulled the circuitry out of an old coffee maker.  There is an LCD.  How would I find out how to interface with this LCD screen?  Could I hook up my scope and do some type of decode?  I don't know what type of chip is controlling it all.  I can take a pic later. 
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: de
Re: SPI UART I2C & Using Salvaged Components
« Reply #1 on: March 19, 2015, 04:01:56 pm »
Um, google I2C, SPI? That should get you started with the most common stuff. Once you "graduate" from that, you can start looking at the higher speed stuff, like LVDS.

Re LCD - depends. If it is a standard module, it is likely controlled by one of those Hitachi HD44780 chips (possibly under a blob of goo), those often have a standard pinout too. If not, then it could be a completely custom affair and good luck trying to reverse engineer that. Unless it is a particularly nice display, I wouldn't bother - a new LCD costs a few bucks and you know what you are getting.

 

Offline otpowellTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: SPI UART I2C & Using Salvaged Components
« Reply #2 on: March 19, 2015, 04:53:52 pm »
Thanks janoc, I did Google it but I wanted a better more in depth source.  I think I found a pretty good eBook that explains it well I think.  Thanks for the suggestions on the LCD.  I think your right I think I saw an HD type number on the chip. 
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: de
Re: SPI UART I2C & Using Salvaged Components
« Reply #3 on: March 24, 2015, 04:44:08 pm »
Thanks janoc, I did Google it but I wanted a better more in depth source.

Well, I2C/TWI has an official spec - good info here: http://i2c.info/i2c-bus-specification (link to NXP, ex. Philips official spec at the bottom). SPI is a lot more loose, there you must check each manufacturer's documentation about how their particular part works.

I think I found a pretty good eBook that explains it well I think.  Thanks for the suggestions on the LCD.  I think your right I think I saw an HD type number on the chip. 

If it is a Hitachi part, it is very likely that the module is a standard part and you could easily re-use it. Just beware of various add-ons that could be on the board - I have a module with a non-standard LCD (multimeter-like large digits + various symbols and smaller text area on the side) driven by the regular Hitachi driver that came with some sort microcontroller and an RS485 transciever chip soldered on. I was able to reuse the module after removing that from the board and reverse engineering the memory layout.
« Last Edit: March 24, 2015, 04:46:18 pm by janoc »
 

Offline otpowellTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: SPI UART I2C & Using Salvaged Components
« Reply #4 on: March 24, 2015, 05:30:00 pm »

Thanks janoc, I did Google it but I wanted a better more in depth source.

Well, I2C/TWI has an official spec - good info here: http://i2c.info/i2c-bus-specification (link to NXP, ex. Philips official spec at the bottom). SPI is a lot more loose, there you must check each manufacturer's documentation about how their particular part works.

I think I found a pretty good eBook that explains it well I think.  Thanks for the suggestions on the LCD.  I think your right I think I saw an HD type number on the chip. 

If it is a Hitachi part, it is very likely that the module is a standard part and you could easily re-use it. Just beware of various add-ons that could be on the board - I have a module with a non-standard LCD (multimeter-like large digits + various symbols and smaller text area on the side) driven by the regular Hitachi driver that came with some sort microcontroller and an RS485 transciever chip soldered on. I was able to reuse the module after removing that from the board and reverse engineering the memory layout.


Thanks I appreciate the great response and link.  How did you go about reverse engineering it?  With a Logic analyzer or bus pirate? 
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: de
Re: SPI UART I2C & Using Salvaged Components
« Reply #5 on: March 27, 2015, 04:11:47 pm »

Thanks I appreciate the great response and link.  How did you go about reverse engineering it?  With a Logic analyzer or bus pirate? 

Oh nothing that complex. The pinout was documented by someone else on the internet, so I didn't have to reverse engineer that one. Then all it took to figure out the segment/character mapping was to write characters in memory of the controller using the standard commands and watch where did it appear on the display. With a bit of trial an error and some guesswork you can figure out the layout fairly quickly.
 

Offline otpowellTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: SPI UART I2C & Using Salvaged Components
« Reply #6 on: March 28, 2015, 04:50:42 am »


Thanks I appreciate the great response and link.  How did you go about reverse engineering it?  With a Logic analyzer or bus pirate? 

Oh nothing that complex. The pinout was documented by someone else on the internet, so I didn't have to reverse engineer that one. Then all it took to figure out the segment/character mapping was to write characters in memory of the controller using the standard commands and watch where did it appear on the display. With a bit of trial an error and some guesswork you can figure out the layout fairly quickly.

By standard commands do you mean 1/high or 0/low? 
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: de
Re: SPI UART I2C & Using Salvaged Components
« Reply #7 on: April 02, 2015, 09:03:17 pm »
By standard commands do you mean 1/high or 0/low? 

Lol, no :) If the device is a standard Hitachi display module, it will use the well documented protocol: https://www.sparkfun.com/datasheets/LCD/HD44780.pdf, regardless of the actual configuration of the display segments. The address space is documented in the datasheet, so all you have to do is to connect the thing to a microcontroller (e.g. an Arduino) and try writing characters (ASCII codes) to various places in the memory of the module using the protocol. Then you watch where does that character appear on the display or which part turns on. From that you should be able to figure out the memory map.
 

Offline otpowellTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: SPI UART I2C & Using Salvaged Components
« Reply #8 on: April 08, 2015, 02:18:39 pm »

By standard commands do you mean 1/high or 0/low? 

Lol, no :) If the device is a standard Hitachi display module, it will use the well documented protocol: https://www.sparkfun.com/datasheets/LCD/HD44780.pdf, regardless of the actual configuration of the display segments. The address space is documented in the datasheet, so all you have to do is to connect the thing to a microcontroller (e.g. an Arduino) and try writing characters (ASCII codes) to various places in the memory of the module using the protocol. Then you watch where does that character appear on the display or which part turns on. From that you should be able to figure out the memory map.

Awesome, thanks for the reply!  Maybe I'll try this out sometime with my Arduino!   


O.T.
Electrical & Electronics Engineering
Sent from my iPhone using Tapatalk
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->