Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

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
 

vysakhpillai

Junior Member level 2
Joined
Jun 10, 2008
Messages
23
Helped
5
Reputation
10
Reaction score
4
Trophy points
1,283
Activity points
1,375
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
 

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
yes from PC.Can you explain further about null terminated arrey?
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top