Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

[General] How to convert string to decimal in pic controller using UART. If i press 9999 controls

Status
Not open for further replies.

ahshiq

Newbie level 4
Joined
Aug 27, 2015
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
58
how to convert string to decimal in pic controller using UART. if i press 9999 contro

how to convert string to decimal in pic controller using UART. if i press 9999 controller takes its ascii value. but i need to display 9999 in 7 segment LED, i am using hi-tech complier,
 

Re: how to convert string to decimal in pic controller using UART. if i press 9999 co

Use atoi() or atol() functions to convert string to integer. If it is float then use atof() function. Then you can extract digits and use mask for 7 Segment display.
 

Re: how to convert string to decimal in pic controller using UART. if i press 9999 co

Just substract 0x30 (48) from each char in input buffer.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top