CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

ccs pic16f77a as1100 led driver

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ww
Guest







ccs pic16f77a as1100 led driver
PostPosted: Sat May 07, 2005 5:29 am     Reply with quote

i can not interface between pic and as1100 ..........
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat May 07, 2005 12:16 pm     Reply with quote

If you look on the product website, it says that as1100 is compatible with
MAX7219. So then use Google to find a driver.

Search for: MAX7219 int char
This will find C language drivers. Most of them are for the 8051.

To search for a CCS driver, use this: MAX7219 "#use delay" int char

When you do that, and follow the links, you eventually get to this
webpage, which has CCS drivers that can be downloaded, down at
the bottom of the page.
http://www.fernando-heitor.de/pic/projekte/max7219/programm.htm
The comments are in German, so you could translate them, but at
least you have a driver.
djpark



Joined: 02 Mar 2004
Posts: 49

View user's profile Send private message

PostPosted: Sun May 08, 2005 8:05 pm     Reply with quote

You can use this site to translate it.

http://world.altavista.com/babelfish/tr

For your convenience, the translated text is here.

Quote:
Sample program for the MAX7219

In this sample program the pins of the MAX7219 are attached as follows:

Pin RB1 = pin DATA of the MAX7219
Pin RB2 = pin LOAD of the MAX7219
Pin RB3 = pin CLK of the MAX7219

I use here a PIC16F873, in addition, a sample program for the PIC16F84a is here present.

I would like to explain here the two important routines, which are relevant for the control of the MAX7219.

The routine AUSGABE() gives the uebermittelteten data to the indicated digit, e.g.. AUGABE(1,0x02); at the digit the number of 2 represents 1.

The routine AUSGABE_INIT() initialize the functions of the MAX7219.

Routine AUSGABE():

Code:
void AUSGABE(char address,char worth)
{
char x;
//before the data will transfer, first the pin LOAD set on LOW.
//the data begin MSB with the bit D15, thus
output_low(LOAD);
//the data bits D15-D12 are transferred
//these there are important, to 0 are not conveyed
for (x=0;x<4;x++)
{
output_low(DATA);
output_high(CLK);
output_low(CLK);
}
//the data bits D11-D8 contain the register address of the MAX7219
for (x=4;x>0;x)
{
if (bit_test(adresse, x-1)) output_high(DATA);
else output_low(DATA);
output_high(CLK);
output_low(CLK);
}
//the data bits D7-D0 are the data to the MAX7219
for (x=8;x>0;x)
{
if (, x-1 bit_test(wert)) output_high(DATA);
else output_low(DATA);
output_high(CLK);
output_low(CLK);
}
//in the end the pin LOAD is set on HIGH, thus is those
//data communication to end
output_high(LOAD);
}


Routine AUSGABE_INIT():

Code:
void ausgabe_init()
{
ausgabe(0x0b, 0x04); //the number of digits is indicated here (5 digits)
ausgabe(0x0c, 0x01); //displays are set on normal operation (no shutdown)
ausgabe(0x09,0xff); //displays are set on normal operation (no display test)
ausgabe(0x0a, 0x00); //the brightness of the digits is stopped here
}


Download of the example of the PIC16F873

Download of the example of the PIC16F84a


-- dj
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group