Showing posts with label MICROCONTROLLER. Show all posts
Showing posts with label MICROCONTROLLER. Show all posts
Wednesday, July 6, 2011
INTERFACE AND PROGRAM LCD TO MICROCONTROLLER CIRCUIT DIAGRAM
Interface & Program LCD 2 x 16 to Microcontroller
The 2 X16 Parallel LCD is an 8 bit or 4 bit parallel interfaced LCD. This unit allows the user to display text, numerical data and custom created characters. The LCD uses the HD44780 series LCD driver from Hitachi, or equivalent controller. The LCD is connected to a female 14-pin connector for easy interface with the BS2p24/40 Demo Board (#45187) and the Professional Development Board (#28138). Though the device has the ribbon cable and 14-pin connector it may also be hooked up manually using the diagram on the next page.
The 2 X16 Parallel LCD is an 8 bit or 4 bit parallel interfaced LCD. This unit allows the user to display text, numerical data and custom created characters. The LCD uses the HD44780 series LCD driver from Hitachi, or equivalent controller. The LCD is connected to a female 14-pin
connector for easy interface with the BS2p24/40 Demo Board (#45187) and the Professional Development Board (#28138). Though the device has the ribbon cable and 14-pin connector it may also be hooked up manually using the diagram on the next page.
The following example 2x16 LCD connection (16characters, 2 line) to a dsPIC30F microcontroller by using a 4-bit and 8-bit interface. The following code demonstrates the usage of the LCD Custom Library routines. The example covers the initialization of the LCD module and instructions for contolling and writing the module. The realization is carried out by using the mikroBasic compiler for dsPIC30F Microcontrollers. The interconnection of the LCD module and a dsPIC30F devices by using a 4-bit interface is shown in Fig. 13-1.
Interface LCD 2 x 16 to MicrocontrollerInterface LCD 2 x 16 to Microcontroller (dsPIC30F) using 4-bit
Interface LCD 2 x 16 to MicrocontrollerInterface LCD 2 x 16 to Microcontroller (dsPIC30F) using 4-bit
example program LCD 4bit
dim txt as string[15]
main:
ADPCFG = $FFFF
Lcd_Init(PORTB, 3,2,1,0, PORTD, 0,2,1)
Lcd_Cmd(LCD_CURSOR_OFF)
Lcd_Cmd(LCD_CLEAR)
Lcd_Out(1, 1, "mikroElektronika")
Lcd_Out(2, 1, "2x16 LCD Testing")
end.
example program LCD 8bit
dim txt as string[10]
main:
ADPCFG = $FFFF ' PORTB to be digital
Lcd8_Init(PORTB, 7, 6, 5, 4, 3, 2, 1, 0, PORTD, 0, 1, 2)
Lcd8_Cmd(LCD_CURSOR_OFF)
Lcd8_Cmd(LCD_CLEAR)
Lcd8_Out(1, 1, "mikroElektronika")
Lcd8_Out(2, 1, "2x16 LCD Testing")
end.
Continue Reading here[...]
The 2 X16 Parallel LCD is an 8 bit or 4 bit parallel interfaced LCD. This unit allows the user to display text, numerical data and custom created characters. The LCD uses the HD44780 series LCD driver from Hitachi, or equivalent controller. The LCD is connected to a female 14-pin connector for easy interface with the BS2p24/40 Demo Board (#45187) and the Professional Development Board (#28138). Though the device has the ribbon cable and 14-pin connector it may also be hooked up manually using the diagram on the next page.
The 2 X16 Parallel LCD is an 8 bit or 4 bit parallel interfaced LCD. This unit allows the user to display text, numerical data and custom created characters. The LCD uses the HD44780 series LCD driver from Hitachi, or equivalent controller. The LCD is connected to a female 14-pin
connector for easy interface with the BS2p24/40 Demo Board (#45187) and the Professional Development Board (#28138). Though the device has the ribbon cable and 14-pin connector it may also be hooked up manually using the diagram on the next page.
The following example 2x16 LCD connection (16characters, 2 line) to a dsPIC30F microcontroller by using a 4-bit and 8-bit interface. The following code demonstrates the usage of the LCD Custom Library routines. The example covers the initialization of the LCD module and instructions for contolling and writing the module. The realization is carried out by using the mikroBasic compiler for dsPIC30F Microcontrollers. The interconnection of the LCD module and a dsPIC30F devices by using a 4-bit interface is shown in Fig. 13-1.
Interface LCD 2 x 16 to MicrocontrollerInterface LCD 2 x 16 to Microcontroller (dsPIC30F) using 4-bit
Interface LCD 2 x 16 to MicrocontrollerInterface LCD 2 x 16 to Microcontroller (dsPIC30F) using 4-bit
example program LCD 4bit
dim txt as string[15]
main:
ADPCFG = $FFFF
Lcd_Init(PORTB, 3,2,1,0, PORTD, 0,2,1)
Lcd_Cmd(LCD_CURSOR_OFF)
Lcd_Cmd(LCD_CLEAR)
Lcd_Out(1, 1, "mikroElektronika")
Lcd_Out(2, 1, "2x16 LCD Testing")
end.
example program LCD 8bit
dim txt as string[10]
main:
ADPCFG = $FFFF ' PORTB to be digital
Lcd8_Init(PORTB, 7, 6, 5, 4, 3, 2, 1, 0, PORTD, 0, 1, 2)
Lcd8_Cmd(LCD_CURSOR_OFF)
Lcd8_Cmd(LCD_CLEAR)
Lcd8_Out(1, 1, "mikroElektronika")
Lcd8_Out(2, 1, "2x16 LCD Testing")
end.
Tuesday, February 15, 2011
Simple Remote Control Circuit
This Infrared Remote Control Software project based on Microchip 16C57 microcontroller is a reference guide to decode infrared remote control signals fromtelevision, VCR, air conditioner or other home appliances handset that uses NEC 6121 infrared format. Once one is ableto understand how to decode an IR signal of a certain format, decoding another format can be easily done as the flow chartis more or less the same except the timing of the new format.
The NEC 6121 format is based on pulse width timing in determining whether the data transmitted is "1" or "0". The data "1" is determined by the pulse width timing from one risingedge to the next rising edge of 2.24ms. The data "0" is determined by the pulse width timing from one rising edge to thenext rising edge of 1.12ms.
Most of the transmitter are modulated using a frequency of 32.75 kHz, 35.0 kHz, 36.0 kHz, 36.7 kHz, 38 kHz, 39 kHz, 40 kHz, 41.7 kHz, 48 kHz, and 56.8 kHz. The ones that are commonly used are 38 kHz and 40 kHz. In order to decode the received signals, the corresponding demodulating receiver must be used. For instance, if a modulating frequency at the transmitterused is 40 kHz, then the receiver demodulating frequency used should be 40 kHz as well. Modulating the data is a betterdesign as this will make the data integrity better and less susceptible to noise. The demodulating receivers can be obtainedfrom suppliers such as Vishay, LiteOn, Sharp or Kodenshi.
One word of caution when using the IR remote control is that it is easily affected by lighting devices that emits the infrared frequency. One such example is the fluorescent tube which emits the infrared frequency in its operation. When thistype of lights is operating, the receiver may not be able to receive the signal from the transmtter due to interference fromthe signals emitted by the flurescent tube. In situation like this, confirm this by switching off the lights when controlling the device.
You may want to consider using RF frequency as a solution in this particular location. Another way isto place a filter in front of the receiver to narrow the infrared window but this solution will compromise the angle andoperating distance of the infrared transmitter.
The infrared remote control software project provides the flow chart and source code and can be downloaded from Microchip website.
Labels:
FLUORESCENT,
INFRARED,
Microchip,
MICROCONTROLLER,
pulse,
remote control,
RF frequency
Subscribe to:
Posts (Atom)

