View previous topic :: View next topic |
Author |
Message |
moritz
Joined: 13 Dec 2003 Posts: 7 Location: London
|
max6953 sample code |
Posted: Mon Aug 09, 2004 9:33 am |
|
|
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
|
|
Posted: Tue Aug 10, 2004 5:49 pm |
|
|
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 |
Posted: Fri Aug 13, 2004 7:38 am |
|
|
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 |
Posted: Sun Aug 29, 2004 10:05 am |
|
|
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
|
|
Posted: Sun Aug 29, 2004 4:13 pm |
|
|
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
|
|
Posted: Mon Aug 30, 2004 9:46 am |
|
|
Hi! Stuart. Thank you very muchi... It's really a great help from you.
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
.
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...
Thank a lot! |
|
|
Guest
|
Stuart |
Posted: Sat Nov 05, 2005 2:01 pm |
|
|
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
|
Re: Stuart |
Posted: Sun Nov 06, 2005 8:44 pm |
|
|
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. |
|
|
|