9S12C32 - LCD HD44780, 4x20, MCUSLK, Assembly Language Examples? - Also, Keypad Help?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

9S12C32 - LCD HD44780, 4x20, MCUSLK, Assembly Language Examples? - Also, Keypad Help?

3,378 Views
boogie76
Contributor I
Hi All,
I am looking for some example initialization sequences and programs in assembly to use with my LCD from Axiom (4x20) and my MCUSLK with a MC9S12C32.  Any links or code snippets would be greatly appreciated.

Also, any Keypad code snippets or links for the same processor and board would be greatly appreciated....just some basic scanning routines, checks, etc.  The keypad is just a basic keypad from Axiom.  It is a 4x4 keypad.

Thank you,
-b

--
Alban Edit: FSL Part Number must figure in Message Subject line.



Message Edited by Alban on 2007-08-23 10:41 PM
Labels (1)
0 Kudos
3 Replies

569 Views
bigmac
Specialist III
Hello b,
 
Have a look at application note AN1774.  It describes initialisation sequences for the LCD, and gives assembly code for the earlier HC12 devices.  A simple parallel interface is assumed, either 8-bit or 4-bit.
 
I suspect your board might use SPI interface using a shift register device.  If this is so, you will need to adapt the code accordingly.
 
Regards,
Mac
 
0 Kudos

569 Views
boogie76
Contributor I
bigmac,
Thank you.  I took a look at that app. note and learned quite a bit.  I also read over the SPI app. note.  What are the basic steps in transitioning from the example setup to the SPI interface?

Thank you,
-b
0 Kudos

569 Views
bigmac
Specialist III
Hello b,
 
The detail in the use of SPI in conjunction with a shift register will depend on how the LCD is connected to the shift register within your board.  There are a number of possibilities.  Some of these issues have been previously discussed in this forum -
 
 
I also found the attached code examples.  One of the examples was written in assembler for HC11, and is based on 8-bit mode.  The other example appears to have been sourced from Axiom, and may possibly be directly applicable to the hardware on your board, but is written in C.
 
Regards,
Mac
 
0 Kudos