Home

Seven Segment Display

image

Contents

1. This document is owned by p nce s ANTECF SOLULIONS www pantechsolutions net b i Republishing or redistribution is prohibited l echnology Beyond the Dreams PIC HOW TO GUIDE Interfacing 7SEG with PIC16F877A B Contents at a Glance PIC16F 18F Primer Board eee eere 3 Seven Segment Display eee eren eene 3 Interfacing Seven Segment Display 4 Interfacing Seven Segment with PIC16F877A 5 Pin Assignment with PIC16F877A eere 5 Circuit Diagram to Interface 7 segment with PIC16F877A 6 Source CODE E 6 C Program to 7 Segment Display using PIC16F877A 7 Testing the I2C Seven segment with PIC16F 10 General Information esses eo esso e oRER M EpRR ER ERS URN eb RE Eus 11 Join the Technical Community Today http www pantechsolutions net PIC16F 18F Primer Board The PIC16F 18F Primer board is specifically designed to help students to master the required skills in the area of embedded systems The kit is designed in such way that all the possible features of the microcontroller will be easily used by the students The kit supports in system programming ISP which is done through USB port Microchip s PIC PIC16F877A PIC16F 18F Primer Kit is proposed to smooth the progress of developing and debugging of various designs encompassing of High spe
2. CE CE CE K CE CE K CE SE CK K K K CE CE CK SE CE SE K CE CK CE CE CE CE K OE SE CK CE SE CE GE K CE CE CE kK kK kK include lt pic h gt Define PIC Registers CONFIG Ox3f72 7 HS Enable PWRTE BOREN Disable CPD CP WDTEN In circuit Debugger define CNTRL PORT PORTA define DATA PORT PORTB void hex2dec unsigned char void send seg unsigned char unsigned char unsigned char unsigned char void DelayMs unsigned int unsigned char x unsigned char thou 0 hun 0 ten 0 single 0 unsigned char CA 10 0 xcO O0xr9 0xa4 0xb0 0x99 0x92 0x82 0xf8 0x50 0x90 unsigned char CC 10 Oe3st 0206 0 55 0247 0266 04260 0 70 050 T DXTE UxXDE T unsigned char CA CNTRL 4 0Ox07 020b 020d 0x0e unsigned char CC CNTRL 4 10x06 0204 0202 0x01 3 unsigned char n 1 void main unsigned char number nRBPU 0 TRISB 0x00 PORTB configured as O P ADCON1 0x07 Configure PORTA amp PORTE as Digital port TRISA 0x00 PORTA Configured as O P Join the Technical Community Today http www pantechsolutions net while 1 if x 200 x 0 singlet Increment up to 9 in unit place if single gt 9 Single 0 tent Increment up to 9 in Tenth place if ten 9 ten 0 hunt Increment up to 9 in Hundredth place irme hun 0 thout Increment up to 9 in Thousandth place Af thouas9 thou 0 send seq thou hun ten single voi
3. 3 PORTA 2 PORTA 1 PORTA O PIC16F LINES Connections Connect PORTB with JP15 via FRC Cable JP15 is at Seven Segment Section Output Digits will be incrementing from 0 to 9999 Join the Technical Community Today http www pantechsolutions net Circuit Diagram to Interface 7 segment with PIC16F877A Qo nan gt gt RA3 AN3 Vref RA2 AN2 Vref MCLR Vpp PIC16F877A C51 22pF i 3 U14 RB2 OSGAIG EKIN RB3 PGM RB4 y agri 10 Mhz E NEN RB5 RB6 PGC RB7 PGD OSC2 CLKOUT 7 SEGMENT DISPLAY Source Code The Interfacing seven segment displays with PIC16F877A program is very simple and straight forward which display a four digit number in seven segment display The C programs are developed in Mplab software Here we are increment a counter and display this value loaded into seven segment driver in PIC16F 18F PIC Primer Board Join the Technical Community Today http www pantechsolutions net C Program to 7 Segment Display using PIC16F877A FK K K K K SK SK SK CE PE SK SE SK CK CE CE K K OK CK CE CE K K CK CK CK CE K SE CK CE CE K K K CK CE CE K K CK CK CK CE K SE CK CE CE CE K K CK CE CE K K CK CK CK CE K SE CK CE CE K K K CK CE CE K K CK CK K CE K CE K CE K K K K Title Program to Seven Segment display K 2K 2K SE SK SK SK SE CK CE KK K SE K SE SK CK K CE K CE CE K CE SE CK CE CK OK CE CE CE CE CK CE CE
4. F 18F Primer Board The PICKIT2 software is used to download the hex file into your microcontroller IC PIC16F877A through USB port Testing the I2C Seven segment with PIC16F Give 12V power supply to PIC16F 18F Primer Board the four seven segment display is connected with the PIC16F 18F Primer Board First check the entire seven segments LED s are properly working or not Here we are display just 1234 in four seven segment The entire seven segments receive it through I2C amp display it in order Join the Technical Community Today http www pantechsolutions net If any data is not coming in seven segments then you just check the entire seven segments LED s are working or not Change the seven segment driver IC amp Check the I2C connections Check the four seven segments connections Otherwise you just check the code with debugging mode in Mplab If you want to see more details about debugging just see the videos in below link How to create amp Debug a Project in Mplab using PIC16F using Hi Tech Compiler General Information e For proper working use the components of exact values as shown in Circuit file Wherever possible use new components e Solder everything in a clean way A major problem arises due to improper soldering solder jumps and loose joints e Use the exact value crystal shown in schematic Join the Technical Community Today http www pantechsolutions net e More instructions are availa
5. ble in following articles gt Interfacing UART with PIC16F877A Interfacing Keys with PIC16F877A gt User Manual of PIC16F 18F Primer Board gt Create amp Debug a project in Mplab using PIC16F877A Join the Technical Community Today http www pantechsolutions net Pantech solutions creates information packed technical documents like this one every month And our website is a rich and trusted resource used by a vibrant online community of more than 1 00 000 members from organization of all shapes and sizes Join the Technical Community Today http www pantechsolutions net What do we sell Our products range from Various Microcontroller development boards DSP Boards FPGA CPLD boards Communication Kits Power electronics Basic electronics Robotics Sensors Electronic components and much more Our goal is to make finding the parts and information you need easier and affordable so you can create awesome projects and training from Basic to Cutting edge technology Join the Technical Community Today http www pantechsolutions net
6. d send seg unsigned char thou unsigned char hun unsigned char ten unsigned char single if n 1 Join the Technical Community Today http www pantechsolutions net CNTRL PORT CA ONTBL O Eanble Unit place 7 Segment DATA PORT CA single Display Unit Place Number n 2 DelayMs 5 else if n 2 CNTRL PORT CA CNTRL 1 Eanble Tenth place 7 Segment DATA PORT CA ten Display Tenth Place Number n 3 DelayMs 5 else if n 3 CNTRL PORT CA CNTRL 2 Enable Hundredth place 7 Segment DATA PORT CA hun Display Hundredth Place Number n 4 DelayMs 5 else if n 4 CNTRL PORT CA CNTRL 3 Eanble Thousandth place 7 Segment DATA PORT CA thou Display Thousandth Place Number n 1 DelayMs 5 void DelayMs unsigned int Ms int delay Sonst while Ms gt 0 Ms for delay const rde lay cnst lt 2207 delay cnst 7 Join the Technical Community Today http www pantechsolutions net To compile the above C code you must need the Mplab software and Hi Tech C Compiler They must be properly set up and a project with correct settings must be created in order to compile the code To compile the above code the C file must be added to the project In Mplab you want to develop or debug the project without any hardware setup You must compile the code for generating HEX file In debugging Mode you want to check the port output without PIC16
7. ed 8 bit Microcontrollers Seven Segment Display A seven segment display is the most basic electronic display device that can display digits from 0 9 The most common configuration has an array of eight LEDs arranged in a special pattern to display these digits They are laid out as a squared off figure 8 Join the Technical Community Today http www pantechsolutions net Interfacing Seven Segment Display Fig 1 shows how to interface the seven segments with microcontroller A seven segment is generally available in ten pin package While eight pins correspond to the eight LEDs the remaining two pins at middle are common and internally shorted These segments come in two configurations namely Common cathode CC and Common anode CA S5V 7 segment Micro controller Fig 1 Interfacing 7segment to Microcontroller Join the Technical Community Today http www pantechsolutions net Interfacing Seven Segment with PIC16F877A We now want to display a four digit number in PIC16F 18F Primer Board by using seven segment displays The seven segment display is connected with PIC16F877A microcontroller In PIC16f 18F Primer Kit 4 nos of common anode seven segment displays are controlled by seven segment drivers Pin Assignment with PIC16F877A 7 SEG Driver GE Ott o ie C NEZ 7 SEG Display CL1 CL2 CL3 CLA PORTB O PORTB 1 PORTB 2 PORTB 3 PORTB 4 PORTB 5 PORTB 6 PORTB 7 PORTA

Download Pdf Manuals

image

Related Search

Related Contents

Second Generation Quad FXS Module User Manual (Rev A)  Real-Time Software User`s Manual  1999-2003 Ford F-Series 7.3L Power Stroke Edge  Sony WSX10FB User's Manual  Fender MUSTANG 3 User's Manual  Using the Cryptographic Service Engine  UV-37SD 取扱説明書ダウンロード(2.07MB  User`s Manual  VirtueMart - 1.1 User's Manual  Benutzerhandbuch SoundPoint® IP 600/601 SIP 1.6  

Copyright © All rights reserved.
Failed to retrieve file