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

LED MESSAGE DISPLAY
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
aiyanyo
Guest







LED MESSAGE DISPLAY
PostPosted: Tue Oct 22, 2002 2:11 pm     Reply with quote

Gents and ladies
have anyone being able to or has examples to implement an led message display
i am new to ccs and my dream is to build an matrix led display
thats why i move in to ccs from picbasic
any pointers would be much appreciated
Isaac
using ccs code
___________________________
This message was ported from CCS's old forum
Original Post ID: 8099
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

Re: LED MESSAGE DISPLAY
PostPosted: Tue Oct 22, 2002 2:29 pm     Reply with quote

You can get PICDEM-2 with a ICD-2 for around $200. CCS has built in functions that can drive the LCD display.
:=
:= Gents and ladies
:= have anyone being able to or has examples to implement an led message display
:= i am new to ccs and my dream is to build an matrix led display
:= thats why i move in to ccs from picbasic
:= any pointers would be much appreciated
:= Isaac
:= using ccs code
___________________________
This message was ported from CCS's old forum
Original Post ID: 8102
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

Re: LED MESSAGE DISPLAY
PostPosted: Tue Oct 22, 2002 2:32 pm     Reply with quote

How big of a display are you thinking about? Serial shift registers or latches (lots of them) will be required. Along with a nice power supply. You define a constant array for symbol or char. Say your display had 8 rows. One byte would represent a column in the display. For a 5x7 font, 6 bytes would create a character. Your hardware would be influenced by the effects that you want (scrolling, sliding). In any event, expect this to be an $$ project :)

Regards,
Mark

:=
:= Gents and ladies
:= have anyone being able to or has examples to implement an led message display
:= i am new to ccs and my dream is to build an matrix led display
:= thats why i move in to ccs from picbasic
:= any pointers would be much appreciated
:= Isaac
:= using ccs code
___________________________
This message was ported from CCS's old forum
Original Post ID: 8103
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

Re: LED MESSAGE DISPLAY
PostPosted: Tue Oct 22, 2002 2:36 pm     Reply with quote

He wants to build his own LED sign. Much like the displays on trains, in airports, etc..

Regards,
mark

:=You can get PICDEM-2 with a ICD-2 for around $200. CCS has built in functions that can drive the LCD display.
:=:=
:=:= Gents and ladies
:=:= have anyone being able to or has examples to implement an led message display
:=:= i am new to ccs and my dream is to build an matrix led display
:=:= thats why i move in to ccs from picbasic
:=:= any pointers would be much appreciated
:=:= Isaac
:=:= using ccs code
___________________________
This message was ported from CCS's old forum
Original Post ID: 8104
Isaac aiyanyo
Guest







Re: LED MESSAGE DISPLAY
PostPosted: Wed Oct 23, 2002 5:57 am     Reply with quote

i was thinking of something small
7 rows by 10 cols
using a johnson counter 4017
would this not be posisble?
___________________________
This message was ported from CCS's old forum
Original Post ID: 8110
Isaac aiyanyo
Guest







Re: LED MESSAGE DISPLAY
PostPosted: Wed Oct 23, 2002 6:05 am     Reply with quote

while we r on this subject
is there anything like serial led displays?
___________________________
This message was ported from CCS's old forum
Original Post ID: 8111
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

Re: LED MESSAGE DISPLAY
PostPosted: Wed Oct 23, 2002 6:15 am     Reply with quote

10 columns doesn't sound like very much! If you were trying to display characters using a 5x7 font, that would only give you 2 that are touching each other. Are you sure that you do not mean 50 or maybe 60 columns. As for the 4017, it is a decade counter. Very useful chip but I can't think of an easy way of using it. A bunch of data latches with some address decoders seems much easier. You should also pwm the LEDs to reduce the current draw.

Regards,
Mark

:=i was thinking of something small
:=7 rows by 10 cols
:=using a johnson counter 4017
:=would this not be posisble?
___________________________
This message was ported from CCS's old forum
Original Post ID: 8113
Sherpa Doug
Guest







Re: LED MESSAGE DISPLAY
PostPosted: Wed Oct 23, 2002 6:43 am     Reply with quote

:=while we r on this subject
:=is there anything like serial led displays?

TI makes some high power serial in parallel out shift registers. You can shift into a long string of them and they can drive LEDs, relays, or whatever. I don't know the part number but it is TPIC something.

___________________________
This message was ported from CCS's old forum
Original Post ID: 8115
istud
Guest







Re: LED MESSAGE DISPLAY
PostPosted: Wed Oct 23, 2002 7:24 pm     Reply with quote

:=
:= Gents and ladies
:= have anyone being able to or has examples to implement an led message display
:= i am new to ccs and my dream is to build an matrix led display
:= thats why i move in to ccs from picbasic
:= any pointers would be much appreciated
:= Isaac
:= using ccs code

Using an SPI device such a Toshiba TB62706 ( 16 led constant current driver) should not be very hard. All you need then are some tables or bitmaps if you want to have graphic symbols.
Good luck.
___________________________
This message was ported from CCS's old forum
Original Post ID: 8134
aiyanyo
Guest







Help in using <74595.C> file
PostPosted: Sun Oct 27, 2002 2:13 pm     Reply with quote

This is what i am trying to do.
===============================
i wan't to be able to use a 74HC595 to light up 8 leds
so that if i send in a value say 11111111 all would be on
00001111 would give 4 on 4 off.

i need help on how to use the <74595.C> file
i can't seem to understand how to use this function which might be because
i have just migrated from picbasic.
please could someone kindly explain this to me if its not too
much trouble.

Thanks in advance
Isaac

___________________________
This message was ported from CCS's old forum
Original Post ID: 8221
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

Re: Help in using <74595.C> file
PostPosted: Sun Oct 27, 2002 3:17 pm     Reply with quote

If you are switching from Basic, then the problem you are probably having is with the pointer notation (since these do not exist in Basic).

In you main file before you include 74595.c, you should place the following defines

#define EXP_OUT_ENABLE PIN_B0
#define EXP_OUT_CLOCK PIN_B1
#define EXP_OUT_DO PIN_B2
#define NUMBER_OF_74595 1

You will need to change the PIN values to whatever you are using. Then you simply call the following function. For example:

void TurnOnAll()
{
int8 mydata;

mydata = 0xFF;
write_expanded_outputs(&mydata);
}

void TurnOnHalf()
{
int8 mydata;

mydata = 0x0F;
write_expanded_outputs(&mydata);
}

You could series several of these devices together in which case you could do something like this:

#define EXP_OUT_ENABLE PIN_B0
#define EXP_OUT_CLOCK PIN_B1
#define EXP_OUT_DO PIN_B2
#define NUMBER_OF_74595 4

void TurnOnAll()
{
int8 mydata[4];

mydata[0] = 0xFF;
mydata[1] = 0xFF;
mydata[2] = 0xFF;
mydata[3] = 0xFF;
write_expanded_outputs(mydata); // or write_expanded_outputs(&mydata[0]);

}


Regards,
Mark

:=This is what i am trying to do.
:= ===============================
:= i wan't to be able to use a 74HC595 to light up 8 leds
:= so that if i send in a value say 11111111 all would be on
:= 00001111 would give 4 on 4 off.
:=
:= i need help on how to use the <74595.C> file
:= i can't seem to understand how to use this function which might be because
:= i have just migrated from picbasic.
:= please could someone kindly explain this to me if its not too
:= much trouble.
:=
:= Thanks in advance
:= Isaac
:=
___________________________
This message was ported from CCS's old forum
Original Post ID: 8223
Isaac aiyanyo
Guest







Re: Help in using <74595.C> file
PostPosted: Mon Oct 28, 2002 6:20 am     Reply with quote

Thank you very much mark.
i really appreciate your help
i am learning and i hope one day i can do some
really good stuff
i am building a demo kit today and i shall try
a few things out.

Isaac
___________________________
This message was ported from CCS's old forum
Original Post ID: 8233
aiyanyo
Guest







Re: Help in using <74595.C> file (still need your help
PostPosted: Mon Nov 11, 2002 5:09 pm     Reply with quote

Mark,
Sorry for the long wait before i give you some
trouble again.
i am having trouble using <74595.C> function.
Beleive me i did follow your instructions but i think i might be doing something wrong.
i am trying to test to code with 16 leds connected to the 2 shift regs which would eventually be my collumns
the 1st 74595 is connected as follows
RC0 to Data IN
RC1 to Clk
RC2 TO Latch

But when i call the function all my leds stay
permently ON
What i wanted to do was to make my 16 leds come on 1
at a time ie if my 16bits are 0000000000000001 <<1 etc.

Could you be kind enough and tell me off wre i am going wrong
This is the program below( i know the hardware is ok
cause i tested it with picbasic, but the way i want to
go is 'C'
hope to hear from u soon
Isaac


#if defined(__PCM__)
#include <16F873.H>
#fuses XT,NOWDT,NOPUT,NOPROTECT,NOBROWNOUT,NOLVP
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_A0, rcv=PIN_A1,RESTART_WDT,ERRORS,INVERT)


#IFNDEF EXP_OUT_ENABLE

#define EXP_OUT_ENABLE PIN_C2
#define EXP_OUT_CLOCK PIN_C1
#define EXP_OUT_DO PIN_C0
#define NUMBER_OF_74595 2
#ENDIF
void TurnOnAll( ) ;
void TurnOffALL( );
#include <74595.C>


#byte port_c=7


main()
{
int pat;
set_tris_c(0);
do
{
port_c = 0;
delay_ms(500);
TurnOnALL();
delay_ms(500);
TurnOffALL();
delay_ms(500);
}
while(1);

}



void TurnOnAll()
{
int8 mydata[2];

mydata[0] = 0xff;
mydata[1] = 0xff;
write_expanded_outputs(&mydata[0]);

}




void TurnOffAll()
{
int8 mydata[2];

mydata[0] = 0x00;
mydata[1] = 0x00;
write_expanded_outputs(&mydata[0]);

}
___________________________
This message was ported from CCS's old forum
Original Post ID: 8768
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

Re: Help in using <74595.C> file (still need your help
PostPosted: Mon Nov 11, 2002 9:49 pm     Reply with quote

Try this and see how it works.

#if defined(__PCM__)
#include <16F873.H>
#fuses XT,NOWDT,NOPUT,NOPROTECT,NOBROWNOUT,NOLVP
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_A0, rcv=PIN_A1,RESTART_WDT,ERRORS,INVERT)


#IFNDEF EXP_OUT_ENABLE

#define EXP_OUT_ENABLE PIN_C2
#define EXP_OUT_CLOCK PIN_C1
#define EXP_OUT_DO PIN_C0
#define NUMBER_OF_74595 2
#ENDIF
void TurnOnAll( ) ;
void TurnOffALL( );
#include <74595.C>


#byte port_c=7


main()
{
long mask = 0x01; // mask for turning on 1 column at a time
int data[2]; // array to store our data
set_tris_c(0);
port_c = 0;
do
{
// store our mask in an array. we need to do this because
// the call to write_expanded_outputs will destroy the value
// passed in.
data[0] = mask;
data[1] = mask>>8;
delay_ms(500);
write_expanded_outputs(data);
delay_ms(500);
// shift to the next column
mask <<=1;
// if our mask is 0 then start over
if (mask==0)
mask = 0x01;
}
while(1);

}



Regards,
Mark

:= Mark,
:= Sorry for the long wait before i give you some
:= trouble again.
:= i am having trouble using <74595.C> function.
:= Beleive me i did follow your instructions but i think i might be doing something wrong.
:=i am trying to test to code with 16 leds connected to the 2 shift regs which would eventually be my collumns
:= the 1st 74595 is connected as follows
:= RC0 to Data IN
:= RC1 to Clk
:= RC2 TO Latch
:=
:= But when i call the function all my leds stay
:= permently ON
:= What i wanted to do was to make my 16 leds come on 1
:= at a time ie if my 16bits are 0000000000000001 <<1 etc.
:=
:= Could you be kind enough and tell me off wre i am going wrong
:= This is the program below( i know the hardware is ok
:= cause i tested it with picbasic, but the way i want to
:= go is 'C'
:= hope to hear from u soon
:= Isaac
:=
:=
:=#if defined(__PCM__)
:=#include <16F873.H>
:=#fuses XT,NOWDT,NOPUT,NOPROTECT,NOBROWNOUT,NOLVP
:=#use delay(clock=4000000)
:=#use rs232(baud=9600, xmit=PIN_A0, rcv=PIN_A1,RESTART_WDT,ERRORS,INVERT)
:=
:=
:=#IFNDEF EXP_OUT_ENABLE
:=
:=#define EXP_OUT_ENABLE PIN_C2
:=#define EXP_OUT_CLOCK PIN_C1
:=#define EXP_OUT_DO PIN_C0
:=#define NUMBER_OF_74595 2
:=#ENDIF
:=void TurnOnAll( ) ;
:=void TurnOffALL( );
:=#include <74595.C>
:=
:=
:=#byte port_c=7
:=
:=
:=main()
:={
:= int pat;
:= set_tris_c(0);
:= do
:= {
:= port_c = 0;
:= delay_ms(500);
:= TurnOnALL();
:= delay_ms(500);
:= TurnOffALL();
:= delay_ms(500);
:= }
:= while(1);
:=
:=}
:=
:=
:=
:=void TurnOnAll()
:={
:=int8 mydata[2];
:=
:=mydata[0] = 0xff;
:=mydata[1] = 0xff;
:=write_expanded_outputs(&mydata[0]);
:=
:=}
:=
:=
:=
:=
:=void TurnOffAll()
:={
:=int8 mydata[2];
:=
:=mydata[0] = 0x00;
:=mydata[1] = 0x00;
:=write_expanded_outputs(&mydata[0]);
:=
:=}
___________________________
This message was ported from CCS's old forum
Original Post ID: 8772
isaac aiyanyo
Guest







Re: Help in using <74595.C> file
PostPosted: Tue Nov 12, 2002 2:38 am     Reply with quote

Mark,
Long time no hear .
i have still got problems using the 74595 function.
i did send you a message about 3 days ago and have being waiting for a reply only to find out it didn't get to the forum.
i have used the function like you asked just calling the function but nothing seems to be happening.
i am testing which 16 led on the 2 shift regs they stay ON when i run the program.
Could you be kind enough to show me the light on where i am going wrong
hoping to hear from you soon
Isaac


#if defined(__PCM__)
#include <16F873.H>
#fuses XT,NOWDT,NOPUT,NOPROTECT,NOBROWNOUT,NOLVP
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_A0, rcv=PIN_A1,RESTART_WDT,ERRORS,INVERT)

//THIS IS ANOTHER PROGRAM CALLED SROLL2//
#IFNDEF EXP_OUT_ENABLE

#define EXP_OUT_ENABLE PIN_C2
#define EXP_OUT_CLOCK PIN_C1
#define EXP_OUT_DO PIN_C0
#define NUMBER_OF_74595 2
#ENDIF
void TurnOnAll( ) ;
void TurnOffALL( );
#include <74595.C>


#byte port_c=7


main()
{
int pat;
set_tris_c(0); /* set port_c as output */
do
{

/* ZERO port_c & port_b */
port_c = 0;
delay_ms(500);
TurnOnALL();
delay_ms(500);
TurnOffALL();
delay_ms(500);
}
while(1);

}



void TurnOnAll()
{
int8 mydata[2];

mydata[0] = 0xff;
mydata[1] = 0xff;
write_expanded_outputs(&mydata[0]); // or write_expanded_outputs(&mydata[0]);

}




void TurnOffAll()
{
int8 mydata[2];

mydata[0] = 0x00;
mydata[1] = 0x00;
write_expanded_outputs(&mydata[0]); // or write_expanded_outputs(&mydata[0]);

}


___________________________
This message was ported from CCS's old forum
Original Post ID: 8779
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
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