SlideShare a Scribd company logo
1 of 29
Download to read offline
Pt-51 Test Program
by
Varun Warrier
Objective
• To test the peripherals of the microcontroller
and the hardware on the Pt-51 board, i.e.
– LEDs
– Switches
– PCA Module
– SPI
– UART
– LCD display
– Port Pins
Test Procedure
• Putting the switches in various positions from
0 to 7 (bit values) will test each of the
peripherals
• The switches are connected to pins P1.0-P1.3
of the microcontroller
• The switches corresponding to P1.0 to P1.2
will be used for the test, with P1.0 being the
LSB and P1.2 being the MSB
• Ongoing test and results displayed on LCD
Test Procedure
Key Position (P1.2-P1.0) Tested Peripheral
000 Timers
001 PWM module
010 Counter Module
011 SPI Module *
100 UART Module **
101 LCD Display
110 Clear Screen
All others Timers
*Pins MOSI and MISO are to be shorted during this time
**Pins 3.0 and 3.1 (UART Rx and Tx) are to be shorted during this time
Please refer to the Pt-51 manual for identifying the pins
Defaults
• Keeping the switches in position 6(0b110)
clears the LCD Screen
• All other key positions (0x07 to 0x0F) run the
default test, i.e., the Timer Test
• If the test fails because the loopback wires are
not connected, plug in the wires and restart
the microcontroller.
• If the test fails in spite of the wires being
connected, inform your TA
Failed Test-SPI/UART
Starting the tests
Timer Test
• How many timers does the microcontroller
AT89C5131A have?
• Switches in Position 0 (0b000) for test
• Timer 0 blinks LED4 (P1.4)
• Timer 1 blinks LED3 (P1.5)
• Timer 2 blinks LED2 (P1.6)
• Try to guess the frequencies
Timer Test
PWM Test
• Uses the PCA module of the microcontroller
• What does PCA stand for?
• Called CCP module in some microcontrollers
• Switches in Position 1(0b001)
• Signals of different duty cycle with the same
pulse width are fed to the 4 LEDs
PWM Test
• Average voltage
applied to LEDs
varied by varying
duty cycle
• As a result they light
up with different
intensities
• Try to guess duty
cycles used in the
program
PWM test
Counter Test
• Uses the PCA module of the microcontroller
• Microcontroller can capture events on a pin
and save it into a register
• Switches in Position 2(0b010)
• Toggle switch 3(P1.2) to increment the count
• When the count reaches 5, test is finished
• Because of bounce, count may increment by
more than one for 1 toggle
Counter Test
Counter Test
Counter Test
SPI Test
• What does SPI stand for?
• Used for communication between uCs and
peripherals(1 or more) or between uCs (1 or
more)
• Switches in Position 3(0b011)
• Short pins MOSI and MISO before test
• Data sent over MOSI is received by MISO
(Called looping back)
• If both bytes match, test is a success
• Procedure repeated 5 times
SPI Test
• SPI uses shift registers to send and receive data
• When bit 7 is transmitted by master, it is put in bit 0 of the
slave. Then both registers are shifted right by one
• Transmission and shifting continues 7 more times till data is in
the right place
SPI Test
SPI Test
SPI Test
UART Test
• One of the most popular communication
interfaces
• Stands for Universal Asynchronous Receiver
Transmitter (Also called RS232)
• Switches in Position 4(0b100)
• Performs loopback as with SPI. Hence need to
short UART Rx and Tx pins (P3.0 and P3.1)
• If sent data = received data, test successful
• Performed 5 times
UART
UART Test
UART Test
UART Test
LCD Test
• Switches in Position 5(0b101)
• LCD has 2 lines with 16 characters each
• Program verifies if the LCD is able to display all
alphanumeric characters
• The program quickly over all alphanumeric
characters at every display block in both lines
• Displays 32 “Z”s at the end of the test
LCD Test
LCD Test

More Related Content

What's hot

8 interrupt 8051
8 interrupt 80518 interrupt 8051
8 interrupt 8051daniemol
 
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...Sivaranjan Goswami
 
Interrupt programming with 8051 microcontroller
Interrupt programming with 8051  microcontrollerInterrupt programming with 8051  microcontroller
Interrupt programming with 8051 microcontrollerAnkit Bhatnagar
 
I o ports and timers of 8051
I o ports and timers of 8051I o ports and timers of 8051
I o ports and timers of 8051SARITHA REDDY
 
Interfacing with Atmega 16
Interfacing with Atmega 16Interfacing with Atmega 16
Interfacing with Atmega 16Ramadan Ramadan
 
Micro controller 8051 Interrupts
Micro controller 8051 InterruptsMicro controller 8051 Interrupts
Micro controller 8051 Interruptsdharmesh nakum
 
Timer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerTimer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerJay Makwana
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Aarav Soni
 
8051 Timers / Counters
8051 Timers / Counters8051 Timers / Counters
8051 Timers / CountersPatricio Lima
 
Using Ready-for-PIC and SDR Libraries
Using Ready-for-PIC and SDR LibrariesUsing Ready-for-PIC and SDR Libraries
Using Ready-for-PIC and SDR LibrariesCorrado Santoro
 

What's hot (19)

Lab8 s2
Lab8 s2Lab8 s2
Lab8 s2
 
8 interrupt 8051
8 interrupt 80518 interrupt 8051
8 interrupt 8051
 
Class9
Class9Class9
Class9
 
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...
 
Interrupt programming with 8051 microcontroller
Interrupt programming with 8051  microcontrollerInterrupt programming with 8051  microcontroller
Interrupt programming with 8051 microcontroller
 
I o ports and timers of 8051
I o ports and timers of 8051I o ports and timers of 8051
I o ports and timers of 8051
 
Lecture 2 timers, pwm, state machine IN PIC
Lecture 2   timers, pwm, state machine IN PIC Lecture 2   timers, pwm, state machine IN PIC
Lecture 2 timers, pwm, state machine IN PIC
 
UART MCU
UART MCUUART MCU
UART MCU
 
Interfacing with Atmega 16
Interfacing with Atmega 16Interfacing with Atmega 16
Interfacing with Atmega 16
 
Class8
Class8Class8
Class8
 
Micro controller 8051 Interrupts
Micro controller 8051 InterruptsMicro controller 8051 Interrupts
Micro controller 8051 Interrupts
 
Timer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerTimer And Counter in 8051 Microcontroller
Timer And Counter in 8051 Microcontroller
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 
8051 Timers / Counters
8051 Timers / Counters8051 Timers / Counters
8051 Timers / Counters
 
8051 interrupts
8051 interrupts8051 interrupts
8051 interrupts
 
8051 Inturrpt
8051 Inturrpt8051 Inturrpt
8051 Inturrpt
 
Ec8791 lpc2148 timer unit
Ec8791 lpc2148 timer unitEc8791 lpc2148 timer unit
Ec8791 lpc2148 timer unit
 
Using Ready-for-PIC and SDR Libraries
Using Ready-for-PIC and SDR LibrariesUsing Ready-for-PIC and SDR Libraries
Using Ready-for-PIC and SDR Libraries
 
Lab8 s1
Lab8 s1Lab8 s1
Lab8 s1
 

Similar to Pt 51 kit - Peripheral self-test

PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSPIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSVISHNU KP
 
ie450pp10.ppt
ie450pp10.pptie450pp10.ppt
ie450pp10.pptpouyan6
 
PLC, or Programmable Logic Controller, is a specialized industrial computer u...
PLC, or Programmable Logic Controller, is a specialized industrial computer u...PLC, or Programmable Logic Controller, is a specialized industrial computer u...
PLC, or Programmable Logic Controller, is a specialized industrial computer u...Govindarajv11
 
PLC (PROGRAMMABLE LOGIC CONTROLLER)
PLC (PROGRAMMABLE LOGIC CONTROLLER)PLC (PROGRAMMABLE LOGIC CONTROLLER)
PLC (PROGRAMMABLE LOGIC CONTROLLER)navalip331
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Dhaval Kaneria
 
MIPI DevCon 2016: MIPI D-PHY - Physical Layer Test & Measurement Challenges
MIPI DevCon 2016: MIPI D-PHY - Physical Layer Test & Measurement ChallengesMIPI DevCon 2016: MIPI D-PHY - Physical Layer Test & Measurement Challenges
MIPI DevCon 2016: MIPI D-PHY - Physical Layer Test & Measurement ChallengesMIPI Alliance
 
8051 microcontroller and it’s interface
8051 microcontroller and it’s interface8051 microcontroller and it’s interface
8051 microcontroller and it’s interfaceAbhishek Choksi
 

Similar to Pt 51 kit - Peripheral self-test (20)

PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSPIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
 
PLC PPT.ppt
PLC PPT.pptPLC PPT.ppt
PLC PPT.ppt
 
ie450pp10.ppt
ie450pp10.pptie450pp10.ppt
ie450pp10.ppt
 
plc1.ppt
plc1.pptplc1.ppt
plc1.ppt
 
PLC Basics
PLC BasicsPLC Basics
PLC Basics
 
ie450pp10.ppt
ie450pp10.pptie450pp10.ppt
ie450pp10.ppt
 
ie450pp10.ppt
ie450pp10.pptie450pp10.ppt
ie450pp10.ppt
 
PLC.ppt
PLC.pptPLC.ppt
PLC.ppt
 
PLC good.ppt
PLC good.pptPLC good.ppt
PLC good.ppt
 
ie450pp10.ppt
ie450pp10.pptie450pp10.ppt
ie450pp10.ppt
 
ie450pp10.ppt
ie450pp10.pptie450pp10.ppt
ie450pp10.ppt
 
ie450pp10.ppt
ie450pp10.pptie450pp10.ppt
ie450pp10.ppt
 
PLC, or Programmable Logic Controller, is a specialized industrial computer u...
PLC, or Programmable Logic Controller, is a specialized industrial computer u...PLC, or Programmable Logic Controller, is a specialized industrial computer u...
PLC, or Programmable Logic Controller, is a specialized industrial computer u...
 
PLC (PROGRAMMABLE LOGIC CONTROLLER)
PLC (PROGRAMMABLE LOGIC CONTROLLER)PLC (PROGRAMMABLE LOGIC CONTROLLER)
PLC (PROGRAMMABLE LOGIC CONTROLLER)
 
Timers and pwm
Timers and pwmTimers and pwm
Timers and pwm
 
PLC.pdf
PLC.pdfPLC.pdf
PLC.pdf
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)
 
8255.pdf
8255.pdf8255.pdf
8255.pdf
 
MIPI DevCon 2016: MIPI D-PHY - Physical Layer Test & Measurement Challenges
MIPI DevCon 2016: MIPI D-PHY - Physical Layer Test & Measurement ChallengesMIPI DevCon 2016: MIPI D-PHY - Physical Layer Test & Measurement Challenges
MIPI DevCon 2016: MIPI D-PHY - Physical Layer Test & Measurement Challenges
 
8051 microcontroller and it’s interface
8051 microcontroller and it’s interface8051 microcontroller and it’s interface
8051 microcontroller and it’s interface
 

More from rajbabureliance (16)

Lab7 s1
Lab7 s1Lab7 s1
Lab7 s1
 
Lab7 s1
Lab7 s1Lab7 s1
Lab7 s1
 
Lab7 s1
Lab7 s1Lab7 s1
Lab7 s1
 
Lab7 s2
Lab7 s2Lab7 s2
Lab7 s2
 
Lab6 s1
Lab6 s1Lab6 s1
Lab6 s1
 
Lab6 s2
Lab6 s2Lab6 s2
Lab6 s2
 
Lab5 s1
Lab5 s1Lab5 s1
Lab5 s1
 
Lab4 s2
Lab4 s2Lab4 s2
Lab4 s2
 
Lab4 s1
Lab4 s1Lab4 s1
Lab4 s1
 
Lab3 s1
Lab3 s1Lab3 s1
Lab3 s1
 
Lab3 s2
Lab3 s2Lab3 s2
Lab3 s2
 
Lab3 s2
Lab3 s2Lab3 s2
Lab3 s2
 
Lab2 s1
Lab2 s1Lab2 s1
Lab2 s1
 
Lab2 s2
Lab2 s2Lab2 s2
Lab2 s2
 
EE337 Course Introduction
EE337 Course IntroductionEE337 Course Introduction
EE337 Course Introduction
 
EE337 Course Introduction
EE337 Course IntroductionEE337 Course Introduction
EE337 Course Introduction
 

Recently uploaded

How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Recently uploaded (20)

How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 

Pt 51 kit - Peripheral self-test

  • 2. Objective • To test the peripherals of the microcontroller and the hardware on the Pt-51 board, i.e. – LEDs – Switches – PCA Module – SPI – UART – LCD display – Port Pins
  • 3. Test Procedure • Putting the switches in various positions from 0 to 7 (bit values) will test each of the peripherals • The switches are connected to pins P1.0-P1.3 of the microcontroller • The switches corresponding to P1.0 to P1.2 will be used for the test, with P1.0 being the LSB and P1.2 being the MSB • Ongoing test and results displayed on LCD
  • 4. Test Procedure Key Position (P1.2-P1.0) Tested Peripheral 000 Timers 001 PWM module 010 Counter Module 011 SPI Module * 100 UART Module ** 101 LCD Display 110 Clear Screen All others Timers *Pins MOSI and MISO are to be shorted during this time **Pins 3.0 and 3.1 (UART Rx and Tx) are to be shorted during this time Please refer to the Pt-51 manual for identifying the pins
  • 5. Defaults • Keeping the switches in position 6(0b110) clears the LCD Screen • All other key positions (0x07 to 0x0F) run the default test, i.e., the Timer Test • If the test fails because the loopback wires are not connected, plug in the wires and restart the microcontroller. • If the test fails in spite of the wires being connected, inform your TA
  • 8. Timer Test • How many timers does the microcontroller AT89C5131A have? • Switches in Position 0 (0b000) for test • Timer 0 blinks LED4 (P1.4) • Timer 1 blinks LED3 (P1.5) • Timer 2 blinks LED2 (P1.6) • Try to guess the frequencies
  • 10. PWM Test • Uses the PCA module of the microcontroller • What does PCA stand for? • Called CCP module in some microcontrollers • Switches in Position 1(0b001) • Signals of different duty cycle with the same pulse width are fed to the 4 LEDs
  • 11. PWM Test • Average voltage applied to LEDs varied by varying duty cycle • As a result they light up with different intensities • Try to guess duty cycles used in the program
  • 13. Counter Test • Uses the PCA module of the microcontroller • Microcontroller can capture events on a pin and save it into a register • Switches in Position 2(0b010) • Toggle switch 3(P1.2) to increment the count • When the count reaches 5, test is finished • Because of bounce, count may increment by more than one for 1 toggle
  • 17. SPI Test • What does SPI stand for? • Used for communication between uCs and peripherals(1 or more) or between uCs (1 or more) • Switches in Position 3(0b011) • Short pins MOSI and MISO before test • Data sent over MOSI is received by MISO (Called looping back) • If both bytes match, test is a success • Procedure repeated 5 times
  • 18. SPI Test • SPI uses shift registers to send and receive data • When bit 7 is transmitted by master, it is put in bit 0 of the slave. Then both registers are shifted right by one • Transmission and shifting continues 7 more times till data is in the right place
  • 22. UART Test • One of the most popular communication interfaces • Stands for Universal Asynchronous Receiver Transmitter (Also called RS232) • Switches in Position 4(0b100) • Performs loopback as with SPI. Hence need to short UART Rx and Tx pins (P3.0 and P3.1) • If sent data = received data, test successful • Performed 5 times
  • 23. UART
  • 27. LCD Test • Switches in Position 5(0b101) • LCD has 2 lines with 16 characters each • Program verifies if the LCD is able to display all alphanumeric characters • The program quickly over all alphanumeric characters at every display block in both lines • Displays 32 “Z”s at the end of the test