louise Guest
|
Sending Keyboard input to LCD |
Posted: Fri Apr 02, 2004 7:57 am |
|
|
Hi guys, Ive searched the forum but couldnt find any help on this so i thought i'ld post up my problem!!!
Basically ive connected my PICDEM 2 PLUS Board to my pc, and am wanting to send whatever i input on the keyboard to the LCD on the demo board.
I have sent strings to the LCD, so i know it is working ok(correct driver), its just that when i send the input from the keybpard to the LCD the output is random symbols, eg: when i type in A, the LCD displays $.
Anyone help me on what im doing wrong?
Heres my Code:
Code: |
char key;
void main() {
setup_adc_ports(NO_ANALOGS);
setup_adc(ADC_OFF);
setup_psp(PSP_DISABLED);
setup_spi(FALSE);
setup_wdt(WDT_OFF);
setup_timer_0(RTCC_INTERNAL);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_timer_3(T3_DISABLED|T3_DIV_BY_1);
lcd_init();
do{
printf("Press any key to continue");
key=getc();
printf(lcd_putc,key);
}while(TRUE);
}
|
|
|