background image

 

  

9

 

4.9  7-Segment LED display 

The  type  of  the  7-segment  LED  display  on  the  Alice  EduPad  is  called  common  anode,  all 
cathodes are driven individually by an output pin and the anode is connected to the 5V supply. 

Before  sending  a  number  to  a  7-segment  LED  display,  the  number  must  be  converted  to  its 
corresponding  7-segment  code  depending  on  how  the  7-segment  display  is  connected  to  an 
output port.   

Because  there  are  not  enough  I/O  pins  available,  the  Alice  EduPad  incorporates  an  HCT595 
shift register to drive the cathodes.  When a cathode  is  low, the  corresponding LED segment 
lights up.   

By convention, the 7segments are called segment A, B, C, D, E, F and G. Their locations in the 

display are shown below: 

                      

The segment A, B, C, D, E, F, G and Decimal Point are driven by QA, QB, QC, QD, QE, QF, 
QG, and QH, respectively.  The hex value of the segment code is shown in the following table: 

Number  DP  G  F  E  D  C  B  A  Hex Value 

0  0 

0x06 

0  1 

0x5B 

0  0 

0x4F 

1  0 

0x66 

 

The above table only lists #1 to #4, it’s not difficult to figure out the other numbers once 
you know how #1 to #4 are created.  To display the number 1 on the 7-segment display, 
you normally send 0x06 to the HCT595. Since this has a common anode, you need to 
invert the 0x06 before sending data out to the HCT595. You could invert the number and 
send 0xF9 to the HCT595 or you could use the C operator and send ~0x06.  
 
 

Содержание Alice EduPad

Страница 1: ...1 Alice EduPad for TI MSP432P401R LaunchPad User s Guide Version 1 04 06 27 2018 ...

Страница 2: ... resources 7 Chapter 4 Hardware Descriptions 8 4 1 LEDs 8 4 2 Push button switches 8 4 3 Light sensor 8 4 4 Potentiometer 8 4 5 Temperature sensor 8 4 6 Speaker 8 4 7 EEPROM 8 4 8 UART communication 8 4 9 7 Segment LED display 9 4 10 LCD display 10 4 11 Digital to Analog Converter DAC 10 4 12 H Bridge 11 4 13 CAN 11 4 14 TFT 11 4 15 OLED 12 4 16 SD card 12 4 17 ESP8266 12 ...

Страница 3: ... level Please note that the MSP432 LaunchPad and USB cable are not included with your purchase of the Alice EduPad trainer The micro USB cable comes with your LaunchPad purchase from TI on line store https store ti com msp exp432p401r aspx jktype companionparts They usually have it in stock Other distributors like Mouser and Digi key all have it but the price may be a little higher The external po...

Страница 4: ...erPacks Onboard XDS 110ET emulator featuring EnergyTrace Technology 2 buttons and 2 LEDs for User Interaction RGB LED Back channel UART via USB to PC 1 3 Alice EduPad hardware features The Alice EduPad board includes the following features for teaching ARM courses 1 Four user LEDs 2 Four pushbutton switches 3 Four Servo controls or relay outputs 4 Speaker to be driven by timer DAC or PWM signal fo...

Страница 5: ...tware development on the Alice EduPad is a two step process 1 Work on the MSP432 LaunchPad standalone and familiarize with its software development Don t plug the Launchpad onto the Alice EduPad until you feel comfortable in writing a small test program because it s easier to test a small program on the Launchpad alone 2 Insert the MSP432 LaunchPad onto the Alice EduPad s J14 and J19 ...

Страница 6: ...6 The MSP432 LaunchPad on the Alice EduPad ...

Страница 7: ...ing Embedded Systems books dp 0997925914 ref sr_1_2 s books ie UTF8 qid 1474025605 sr 1 2 keywords MSP432 ARM Book Mazidi and Naimi Sample programs are available at Professor Mazidi s web site http www MicroDigitalEd com ARM MSP432_books htm Chapter 3 On line resources MSP432 LaunchPad user s guide including schematic http www ti com lit ug slau597f slau597f pdf How to download and install Keil an...

Страница 8: ... ADC port 4 5 Temperature sensor AN2 The temperature sensor LM45 or equivalent is connected to the PE5 AIN8 of the ADC port 4 6 Speaker The speaker is a 5V audio magnetic transducer and it s driven by the PC4 a timer or by the DAC output from U17 MCP4725 The signal source of the speaker is selected by the jumper J24 4 7 Serial I2C EEPROM A small serial EEPROM 24LC02 is provided for experimenting w...

Страница 9: ... the 7segments are called segment A B C D E F and G Their locations in the display are shown below The segment A B C D E F G and Decimal Point are driven by QA QB QC QD QE QF QG and QH respectively The hex value of the segment code is shown in the following table Number DP G F E D C B A Hex Value 1 0 0 0 0 0 1 1 0 0x06 2 0 1 0 1 1 0 1 1 0x5B 3 0 1 0 0 1 1 1 1 0x4F 4 0 1 1 0 0 1 1 0 0x66 The above ...

Страница 10: ...acklight for LCD module Pin 16 Backlight ground EN DIS for LED back light The HCT595 is connected to the LCD controller with QE QH to DB4 DB7 QA to RS QB to enable The QC and QD are not used The LCD module is hardwired for write only operation 4 10 2 Parallel interface LCD the jumper is placed on the 2 left hand pins of J23 The Alice EduPad also incorporates a parallel interface for the LCD the P3...

Страница 11: ...motors to be used to test your software should be small low current and low voltage DC motors like under 12V and 300mA The third pin is the PWM input for receiving different pulse widths to vary motor speed It is driven by pin P2 7 of the Launchpad The sample program is available on Professor Mazidi s web site The other half of the H bridge driver is controlled by P2 5 P2 4 for direction and P2 6 ...

Страница 12: ... ESP8266 is to bring WiFi capability into students projects The ESP8266 is controlled by the MSP432 LaunchPad via AT commands in serial communication Many sample programs are downloadable from Professor Mazidi s web site Chip select P6 6 MOSI P1 6 SCLK P1 5 MISO P1 7 Pin Name Connect to Pin Name Connect to 1 TX RX LED0 of LP 2 GND GND of LP 3 CH_PD 3 3V 4 GPIO2 Pull up via a 10K 5 RST Reset of LP ...

Страница 13: ...rolled by P2 5 and P5 5 Servos are supplied with 5V J11 LCD backlight J13 Analog sensor inputs and can be used for an IR distance sensor such as GP2D12 or other analog or digital sensors J14 LaunchPad main pin header 1 J19 LaunchPad main pin header 2 J23 LCD interface type select serial or parallel J24 Speaker source select Timer or DAC J25 2 2 QVGA TFT display interface J27 CAN1 CAN2 select not n...

Страница 14: ...mory P6 7 J19 11 J25 3 LCD 16x2 TFT P2 3 J19 13 7 segment display P3 0 J19 6 TFT s D C LCD s R S P3 2 J14 5 J34 3 LED0 H Bridge ESP8266 P3 3 J14 7 J34 2 LED1 H Bridge ESP8266 P2 5 J19 4 LED2 H Bridge P2 4 J19 5 LED3 H Bridge P6 1 J14 6 SW5 Pushbutton P4 0 J14 8 SW4 Pushbutton P4 2 J14 10 SW3 Pushbutton P4 4 J14 12 SW2 Pushbutton P1 5 SPI SCLK J14 13 7 segment display LCD TFT P1 7 SPI MISO J19 14 7...

Страница 15: ...15 ...

Отзывы: