Kfir Maymon
Member level 1
- Joined
- Sep 20, 2013
- Messages
- 40
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 8
- Location
- Israel
- Activity points
- 315
hi,
sorry for the stupid question but what i am doing wrong?
i get temp = -02302
sorry for the stupid question but what i am doing wrong?
Code:
long temp=0;
char txtt[11];
void init(){
CM1CON0=0x07;
ANSEL=0x0f;
TRISC=0x00;
TRISB=0xf0;
}
void main() {
init();
UART1_Init(19200);
while(1){
temp = (1023 * 254);
IntToStrWithZeros(temp, txtt);
UART1_Write_Text("TEMP ");
UART1_Write_Text(txtt);
UART1_Write_Text("\r\n");
delay_ms(1000);
}
}
i get temp = -02302