4 Digit Multiplexed Segment Display
Here is a simple example program in C language for 4 Digit Seven Segment Display in multiplexed method project. This code written in MPLAB IDE.
Compiler : Microchip C18 C Compiler
Kit : Bootloader USB PIC18F4550
Project : 4 Digit Seven Segment Display Demo
Hardware connection :
RB0 -> SEG DATA A
RB1 -> SEG DATA B
RB2 -> SEG DATA C
RB3 -> SEG DATA D
RB4 -> SEG DATA E
RB5 -> SEG DATA F
RB6 -> SEG DATA G
RB7 -> SEG DATA DOT
RD1 -> SEG CNTL 1
RD2 -> SEG CNTL 2
RD3 -> SEG CNTL 3
RD4 -> SEG CNTL 4
Output demo:
Simple understanding of multiplexing concept shown in given :
Create a project file in MPLAB is here
Source Code:
#include < p18F4550.h>
#include < delays.h>
#include "bootseg.h"
void low_isr(void);
void high_isr(void);
#pragma code low_vector=0x2018
void interrupt_at_low_vector(void)
{
_asm GOTO low_isr _endasm
}
#pragma code
#pragma code high_vector=0x2008
void interrupt_at_high_vector(void)
{
_asm GOTO high_isr _endasm
}
#pragma code
#pragma interruptlow low_isr
void low_isr (void)
{
return;
}
#pragma interrupt high_isr
void high_isr (void)
{
return;
}
void main( void )
{
SegInit();
while(1)
{
SetSegAll('1', '2', '3', '4');
}
}
User Comments
No Posts found !Login to Post a Comment.