Posts

Showing posts from December, 2015

Interfacing microcontroller to LCD display

Image
Interfacing microcontroller to LCD display The LCD module has LCD screen 240 x 128 driven with T6963C controller, operating in text and/or graphic mode. The initial settings of the controller are: Pin name state

Matrix Keypad + serial transmission

Image
Test 15. Matrix Keypad + serial transmission Keypads play important role in a small embedded system where human interaction or human input is needed. All we have to do is connect the rows and columns to a port of microcontroller and program the controller to read the input. We make the rows as i/p and we drive the columns making them o/p, this whole procedure of reading the keyboard is called scanning. A 3 x 4 matrix keypad is used for data entry. The 12 push switches are connected to seven lines of port A, as shown in figure 36. Program description Interrupt Service Routine has not been used in the program. The three columns of the keypad are connected to three of the output signals from the PIC. The four rows of the keypad are connected to four of the input signals to the PIC. If no key is pressed there is no electrical contact between the rows and the columns. The PIC detects which key is pressed by ‘scanning’ the keypad. First the PIC makes the column 1 curren...

Dual RS232 software interface for PC and PIC microcontroller

Image
Test 14. Dual RS232 software interface for PC and PIC microcontroller In many PICMicros a built in serial interface, known as USART for “Universal \Synchronous/Asynchronous Receiver/Transmitter” is available. This hardware al- lows data to be received and sent without any software involvement. To send data, the USART simply shifts the data out (low byte first) to the TX I/O pin. To receive data, the USART works by polling (sampling) the serial data input line at sixteen times the data rate. When a “low” is detected, the hardware waits 8 poll- ing cycles to check to see if the line is still low half a bit period later. If it is, then a bit is read every sixteen polling clocks until the whole byte has been read in. At the end of the byte, the Stop bit is checked to be high. If the byte is received with- out any problems, a byte received flag is set. The software presented in our test provides similar serial interface functions while using not USART module, but general purpose I...