Usb pic18f4550 :: 4 digit multiplexed segment display

4 Digit Multiplexed Segment Display


Compiler : Microchip C18 C Compiler

Kit : Bootloader USB PIC18F4550

Project : 4 Digit Seven Segment Display Demo


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.

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 :

 Power Supply circuit


Create a project file in MPLAB is here


Source Code:

/*  SOURCE : WWW.ROMUX.COM
    AUTHOR : romux team     */ 
    
    
#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');
		
	}	
	
}

Bootseg.h details







anonymous   said:
7 years ago

How do end the program, if there an error like " error 29 expected ENDW "

Points :   0




Post Your Comments Here :
 


User Login

Username :


Password :