USB CDC with vb.net convert ascii value to char

Status
Not open for further replies.

nicko-391

Member level 2
Joined
Dec 8, 2010
Messages
42
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Sri Lanka
Activity points
1,542
I sent a string from PC (using Vb.net) to PIC (CCS). But Pic got string as ASCII value. so i cant display that string on LCD(16x2) which is connected to PIC.It displays only each ascii values.

How can I convert ascii value to corresponding character?

VB(PC)>> serialport1.writeline("The")

CCS(PIC)>> value=usb_cdc_getc();
printf(lcd_putc,"%f",volt));


please help
 

are you receiving all the characters in the PIC? if so frame it to a NULL ('/0') terminated array (which is a string) and use it in the LCD function
 
yes from PC.Can you explain further about null terminated arrey?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…