Wednesday, February 8, 2012

Custom Character Generation on 16x2 char lcd

   Most of the alpha numeric  LCD like 16x2 char or 16x4 char have ability to generate few custom characters. in this example i will show you how to make and display these custom characters on a 16x2 char lcd with Hitachi HD44780 lcd controller.

 HD44780 LCD can have upto 8 custom characters.


THEORY FOR CUSTOM CHARACTER GENERATION 

the basic technology of  lcd based on 3 type of   memory

CG ROM : this the memory which holds the permanent fonts you call to be displayed . this holds the pattern for every single character of  predefined lcd font. and you call the content of this memory by the placeing  corresponding ascii value on the lcd port . like for retrieval of   'A' you have to send the ascii value of 'A' which is 0x41 to the lcd.   CGROM can also be seen as computer hard drive from where you load your required program into ram to start working. but it is not modify able because it's rom.

DD RAM : DDRAM is the memory which holds only those characters which are currently on the screen . means if there is a message is currently being displayed on the screen then it has to be  on the DDRAM
for example if you want to display "hello" on the screen then you have load pattern of h from the CG ROM TO DD RAM then do the same for 'e' ,'l' ,'l' and 'o'.

Saturday, February 4, 2012

MSP430 BASED 30V VOLT METER


       This is a simple application of internal 10-bit ADC(analog to digital  converter) of MSP430G2231 microcontroller.you can use this  circuit  to measure  up to 30 v dc. the possible  applications are on bench top power supply or as a panel meter in various system.

Circuit description
            TEXAS INSTRUMENTS  MSP430G2231  is the heart and brain of this circuit .the internal adc of the mcu with a resistor network voltage  divider is used to measure the input voltage . then 3 digest of comm anode 7 segment display is used to display final converted voltage. as you can see in the schematic the displays are multiplexed with each other . means we switch on one display and put the corresponding digit on this while other two displays are off this cycle go for each of the display.

   the only problem with MSP430 mcu is there is very less I/O lines are available to use so we need 7 +3 lines to drive the display and maybe one more pin for adc input (if adc input is not multiplexed with other pin) total 10to11 lines are required but we don't have that much lines from mcu so we have to use 74LS47 bcd to 7segment decoder  ic which enable us to display any digit with only 4 i/o lines instead of 7 lines so now we require only 4+3+1 lines total 8 lines.

you can find more about driving multiplexed 7 segment led display from a mcu in application note from My previous post click here
in my circuit the refresh rate is about 50hz.




 Voltage Divider Front End

30 volts Panel Volt Meter Using PIC MCU

       This is a simple application of internal 10-bit ADC(analog to digital  converter) of PIC16F676 microcontroller.you can use this  circuit  to measure  up to 30 v dc. the possible  applications are on bench top power supply or as a panel meter in various system.

Circuit description 
            MICROCHIP'S PIC16F676 is the heart and brain of this circuit .the internal adc of the mcu with a resistor network voltage  divider is used to measure the input voltage . then 3 digest of comm anode 7 segment display is used to display final converted voltage. as you can see in the schematic the displays are multiplexed with each other . means we switch on one display and put the corresponding digit on this while other two displays are off this cycle go for each of the display.

you can find more about driving multiplexed 7 segment led display from a pic mcu in application note from microchip AN557 Four Channel Digital Voltmeter with Display and Keyboard

in my circuit the refresh rate is about 50hz.



 Voltage Divider Front End