Returning to our discussion of the previous post, we will take towards the definition of the function of each pin of the MSP430F2013 microcontroller. Remembering that we have as peripherals: buttons, lcd, external timer and temperature sensor. So for the buttons, and LCD timer will have to use I / O ports, and an analog port to sensor . Analyzing the port configuration we get:
So we have 10 I / O ports being 8 analog and serial 3, the large number of analog ports MSP makes a micro very flexible, and cheap, so can be used in numerous projects with different peripherals to be controlled, serial ports multiply even more there capacity. For this reason is a microcontroller widely used in the electronics industry.
- Taken from: http://www.lcd-module.de/eng/pdf/doma/dip162-de.pdf
The LCD model we use is a standard 2x16 with 16 ports. Then the pins 1 and 5 are grounded, the 2 goes in Vcc, the 3 is the contrast adjustment, and a pot goes connecting to, the pins 4 and 6 to 10 are given these go into the microcontroller. As you can see we are working with half the data pins, only 4 bits, this adjustment is needed because the microcontroller need be able to support all peripherals.
The timer that will work with an HT1380 is a 33KHz crystal, this MSP will use 3 ports, these are the serial ports.
The timer that will work with an HT1380 is a 33KHz crystal, this MSP will use 3 ports, these are the serial ports.
An analogical port will be dedicate to the input of the temperature sensor LM35. So of the 10 available ports are connected to the MSP 6 lcd, timer 3 are parallel to the LCD 3, and 1 is connected to the sensor, leaving us 3 free ports of 10. These ports are connected to 3 buttons that will set the clock.
Finally all the doors of the computer are busy with their own devices, we must now consider how these are connected, but this is a subject for another post.
Finally all the doors of the computer are busy with their own devices, we must now consider how these are connected, but this is a subject for another post.
So 6 of the 10 available ports on MSP are connected to the LCD, the 3 of the timer are parallel to the 3 of LCD, and 1 is connected to the sensor, leaving us 3 free ports of 10. These ports are connected to 3 buttons that will set the clock.
Finally all the doors of the computer are busy with their own devices, we must now consider how these are connected, but this is a subject for another post.
Nenhum comentário:
Postar um comentário