Light Projects:LED Binary Counter

This chapter describes simple light projects using the basic 89C2051 micro- controller circuit described in earlier chapters. Over ten projects are given, from very simple LED display projects to complex projects incorporating alpha- numeric displays. For each project, the following information is given as appropriate: • Function: what the project does, its inputs and outputs. […]
Continue reading…

 

Dual RS232 software interface for PC and PIC microcontroller

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) […]
Continue reading…

 

Timer

Test 13. Timer Real Time Clock emulation on the LCD Source code: Program description When microcotroller powers on, it starts counting the time and shows the time on the LCD display in the format HH:MM. Colon between hours and minutes is flickering with the frequency of 1 Hz. After 60 s number of minutes increases […]
Continue reading…

 

Driving a 7-Segment LED Display with PIC16F628 microcontroller

Test 10. Driving a 7-Segment LED Display with PIC16F628 microcontroller Below presented application was run on the prototype board Microcon4. The application can be used for testing all 8 lines connecting port B with the display and the display itself. 16 hexadecimal digits 0 – F are shown sequentialy one after an- other with time […]
Continue reading…

 

Working with debugger. Turn the LED on for the calculated period of time.

Test 9. Working with debugger. Turn the LED on for the calculated period of time. We select Debugger>Select Tool pull down menu and check MPLAB SIM. Addi- tional menu items will appear in the Debugger menu. The MPLAB SIM simulator is integrated into MPLAB IDE integrated develop- ment environment. MPLAB SIM allows us to: · […]
Continue reading…

 

Waking the device from SLEEP with RB4 interrupt-on- change

Test 8. Waking the device from SLEEP with RB4 interrupt-on- change Program description Four PORTB pins, RB<7:4>, if configured as inputs, have an interrupt-on-change feature. This interrupt sets flag bit RBIF and can wake the device from SLEEP. Interrupt is enabled after setting the RBIE mask: bsf intcon, rbie Interrupt on mismatch feature together with […]
Continue reading…