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 CCS Technical Support

max6953 sample code

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



Joined: 13 Dec 2003
Posts: 7
Location: London

View user's profile Send private message Visit poster's website

max6953 sample code
PostPosted: Mon Aug 09, 2004 9:33 am     Reply with quote

Has anyone used the max6953 to drive led matrix displays? I would be very grateful for some sample code to address the max6953 from a pic. I have difficulties understanding the protocol from the datasheets.

Many thanks in advance, Moritz.
StuH_CC



Joined: 07 May 2004
Posts: 16
Location: Shropshire, UK

View user's profile Send private message

PostPosted: Tue Aug 10, 2004 5:49 pm     Reply with quote

Hi Moritz,

I've used this device very successfully with PICs, they work extremely well. I have a fairly complete, if a bit untidy, library of functions covering most of the features of the MAX6953 that you're likely to want to use. It was written for a PIC16F819 using CCS PCM 3.185, but it's nothing special and should be easily portable to another device/version.
I had thought about posting this in the code library section, but didn't think there'd be any interest. I know better now...

Update: I've now posted the code - I'll leave the clean-up to anyone who wants to do it, but it works as-is.

Stuart.
_Moritz
Guest







Thanks
PostPosted: Fri Aug 13, 2004 7:38 am     Reply with quote

Hi Stuart, thanks for that, I'll have a look now. Meanwhile I've deciphered most of the data sheet and I've managed to use both the built in characters as well as defined my own. The only problem that is left to sort now are some strange artefacts on the matrix (one column is constantly on and one row is behaving erratically as well.) I hope to sort that out over the weekend. Thanks again, Moritz.
Guest








Re: Thanks
PostPosted: Sun Aug 29, 2004 10:05 am     Reply with quote

May I know how to define own character (I've done so, but not quite sure of it) and most importantly to display it on LED? Thanks!
StuH_CC



Joined: 07 May 2004
Posts: 16
Location: Shropshire, UK

View user's profile Send private message

PostPosted: Sun Aug 29, 2004 4:13 pm     Reply with quote

I've never bothered with it, but my understanding is that you have to write the base address via register 5, with most significant bit set, then write the 7 bit data to the same register with MSB clear. There are 120 entries, and the address register autoincrements after each data write, so the initial address only needs to be written once. Each 7 bit data write corresponds to a vertical line on the display, there being 24 user-definable characters.

the code might look something like:
Code:

i2c_start();
i2c_write( device_address );
i2c_write( 0x05 );                  //user-defined char register
i2c_write( 0x80 );                  //base address=0, MSB set
i2c_write( 0x7F );                  //data, all LEDs on
i2c_write( 0x00 );                  //data, all LEDs off
..... more data writes go here, max 120 lines of display data
i2c_stop();


To display the characters, simply use the routine you use to display normal built in ones, but use codes 0-24 instead of the ASCII values normally used.

Hope this helps.
Stuart.
Guest








PostPosted: Mon Aug 30, 2004 9:46 am     Reply with quote

Hi! Stuart. Thank you very muchi... It's really a great help from you. Laughing

All this while, my problem is I don't know we can just call out the character by the code between 00-23. That simple until I started to
Embarassed .

I tried very hard to look it out and was fall deep just to figure how to read out the font data from the address pointer position. Then how to display it.

You just help me jump out from the trap I made for myself... Idea

Thank a lot! Wink
Guest








Stuart
PostPosted: Sat Nov 05, 2005 2:01 pm     Reply with quote

Do you have a schematic that you can share with me on connecting the pic to the 6953? thanks
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

Re: Stuart
PostPosted: Sun Nov 06, 2005 8:44 pm     Reply with quote

Anonymous wrote:
Do you have a schematic that you can share with me on connecting the pic to the 6953? thanks

There is a schematic at the bottom of this page http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3291. Hooking SCL and SDA to SCL and SDA on your PIC should be enough. If you have a 5V system, pull-ups should be 2.2k.
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