May-13th-2010
Timers are common features of most microcontroller. In simplified terms a timer
is just a register whose value keeps increasing (or decreasing) by a constant
rate without the help of the CPU. The CPU can read or write this register any
time. It reads it find out how much [...]
Posted in Microchip PIC Tutorials by: Avinash -- 4 Comments -- ReadMore
May-11th-2010
Hello Friends! In this tutorial I will discuss how to practically do a simple
communication over RS232 interface. For those who are completely
new to this I clarify that the motive is to send and receive data between
two device using a standard called RS232. RS232 is serial interface [...]
Posted in Microchip PIC Tutorials by: Avinash -- 8 Comments -- ReadMore
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-2009
A large number of embedded project require some type of user interface. This
includes displaying numerical, textual and graphical data to user. For very
simple numerical display we can use 7
segment displays. If the requirement is little more than that, like displaying
some alphanumeric text, we [...]
Posted in Microchip PIC Tutorials by: Avinash -- 12 Comments -- ReadMore
Apr-19th-2009
Hello friends, welcome to this exciting tutorial were we will begin our journey
with latest PIC18F micros from Microchip
Technologies. This tutorial will give you information on what software/hardware
you will require and basic steps on how to get, install, configure and use them.
After going through [...]
Posted in Microchip PIC Tutorials by: Avinash -- 10 Comments -- ReadMore