Function addition between function.

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
Hello,
How to add function between this calling function...
display(" Led ");
unsigned char a=5; which will change reliquary
how to add a variable between " suppose a"
display(" a");

thanks
 

spinnaker

Joined Oct 29, 2009
7,830
Hello,
How to add function between this calling function...
display(" Led ");
unsigned char a=5; which will change reliquary
how to add a variable between " suppose a"
display(" a");

thanks
You will need to be more clear. Your message makes no sense. Do you have someone to help you with English?

E
 

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
Hello,
Sorry for incomplete meaning!
OK, here are some code to display the Text on led matrix pixel.
I need to add some more function(feature) to display outsourcing text/digit.

clear();
display(" Led "); // call display as Led is constant so, how to add variable stored in memory like temperature counter or something taken from serial data interface ?
blit(1);






display(char *str)
{

int addr;
int z;
while(*str!=0){
addr = ((int)*str++ - 0x20);
addr *= 5;
int y=0;
for(z=0;z<5;z++){
leds[z] = Font2[addr+y];
y++;
}
 

ErnieM

Joined Apr 24, 2011
8,377
While I could make a good guess at what you are not stating just list what type of variables (string, const string, int, const int, etc) you wish to display.

And a hint at which compiler you use would be useful too.
 

spinnaker

Joined Oct 29, 2009
7,830
Hello,
Sorry for incomplete meaning!
OK, here are some code to display the Text on led matrix pixel.
I need to add some more function(feature) to display outsourcing text/digit.

clear();
display(" Led "); // call display as Led is constant so, how to add variable stored in memory like temperature counter or something taken from serial data interface ?
blit(1);






display(char *str)
{

int addr;
int z;
while(*str!=0){
addr = ((int)*str++ - 0x20);
addr *= 5;
int y=0;
for(z=0;z<5;z++){
leds[z] = Font2[addr+y];
y++;
}
Still no idea. What is " outsourcing"
 

BobTPH

Joined Jun 5, 2013
9,003
I think you want to convert a number to a string to display. the function itoa() will do this. Also, sprintf() can combing text and number into a string.

Bob
 

WBahn

Joined Mar 31, 2012
30,084
I think you want to convert a number to a string to display. the function itoa() will do this. Also, sprintf() can combing text and number into a string.

Bob
The problem here is that many standard library functions, particularly something like sprint() are extremely computationally expensive in an embedded system and may not even be provided in the libraries supplied with the compiler.

Of course, it might help if the OP would tell us what compiler.
 

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
While I could make a good guess at what you are not stating just list what type of variables (string, const string, int, const int, etc) you wish to display.

And a hint at which compiler you use would be useful too.
Hello,
The MP LAB IDE V8.87.
actually DISPLAY will take char inside display( " all char alphabetizes/ constants" ) but i want to modify to have other number like if there is up/down counter to be display in matrix not in seven segment and we have to input source always not from compiling or loading chip we can go for serial communication usb to rs232 or blue tooth difff ways.
 

ErnieM

Joined Apr 24, 2011
8,377
Hello,
The MP LAB IDE V8.87.
actually DISPLAY will take char inside display( " all char alphabetizes/ constants" ) but i want to modify to have other number like if there is up/down counter to be display in matrix not in seven segment and we have to input source always not from compiling or loading chip we can go for serial communication usb to rs232 or blue tooth difff ways.
Which answers nothing about which compiler or variable types you use. Oh well... to

To convert an integer type some compilers include a function called "itoa" as BobTPH mentioned. This converts an integer to an ASCII string.

If your compiler did not include i just Google it and you will find lots of sample code.
 

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
hi again,
sorry for misunderstanding it is Hi tech C compilers.
anyways, the display function only send char or numerical numbers i want to send the up down counter save in memory please tell which function to use?
 
Top