Hello every one!
I just want a printf statement for a mini project with the smart cards (16f876+24c16).
but if I have "y=00111000" this code is received from a memory and I want compatible with the print's function of RS232! beacause the function "putc" for exemple, read only one binary code when is written in the following form "y=0b00111000". So "putc" can not print the binary digit who I have read from a memory !
Bonjour tout le monde!
j'ai un probleme de compatibilité, lorsque je veux afficher une donnée recupéré de la mémoire 24c16, par exemple (y=00111000) la fonction "putc" lire cette valeur BIN comme une donnée DEC alors cette fonction lis seulement les valeurs BIN ecrit sous la forme (y=0b00111000).
Code:
#include <16F877A.H>
#fuses XT, NOWDT, BROWNOUT, PUT, NOLVP
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)
//-------------------------Code----------------------------
void main()
{
int8 y;
y = 00111000; // this code is received from a memory and I want
// compatible with the print's function of RS232
putc(y);
}