Apr-28th-2010
#include <htc.h>
#define _XTAL_FREQ 20000000UL
typedef unsigned char UINT8;
typedef signed char INT8;
typedef unsigned int UINT16;
typedef signed int INT16;
//Connection of Seven segment display
#define SEVEN_SEGMENT_LAT PORTD
#define SEVEN_SEGMENT_TRIS TRISD
//MUX Control
#define MUX_PORT PORTB
#define MUX_START_POS 1 //From which bit on port the select lines start
//MUX settings
#define MUX_DISP_COUNT 4 //Number of displays
//Global Varriable
UINT8 DisplayArray[MUX_DISP_COUNT];//Holds 'data' for each disp
void SevenSegmentWrite(UINT16 n)
{
/*
[...]
Posted in Code Snippets by: Avinash -- 2 Comments -- ReadMore
Oct-11th-2008
Hi Friends,
In last tutorial we discussed about Multiplexing Seven Segment Displays. So you must be very much familier with the therory. Now let us write the code and design a small project that will make you expert in using these displays in your own projects. We will make a system that can display any number [...]
Posted in AVR Tutorials by: Avinash -- 29 Comments -- ReadMore
Oct-4th-2008
We have discussed the basics of seven segment displays on our tutorial “Using Seven Segment Displays with AVR MCUs”. So you should be familiar with them. In this tutorial we will discuss about multiplexing of seven segment displays.Multiplexing is required when we want to interface 3 or 4 or even more such displays
with MCUs since [...]
Posted in AVR Tutorials by: Avinash -- 11 Comments -- ReadMore