Forum: Mikrocontroller und Digitale Elektronik Problem with debusgging atoi function in MPLAB using PICKIT3


von Enrique P. (flote21)


Lesenswert?

Hello people,

I am trying to convert an array of 2 characters into integer 16 bits 
usign atoi function but when I debug my program with MPLAB the int value 
is always 0. Is there any problem using this conversion functions?

PD; The compiler is XC8 => PIC18F4520.

Thanks!

von Develop_t (Gast)


Lesenswert?

Hi,

What is in your char array? Charakter or a number.

Because atoi() search if there a number in your char[] (string).

Is ist true you become the number. Is it false u become the 0.

I hope it help you.

Sry for my bad english.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.