I'm using serial port to transmit and receive data. The problem is the convertion from char to integer. For example I receive an 'A' and I want to convert this 'A' into int count = 65 decimal.
The previous reply shows how to convert ASCII-formatted hexadecimal value to a (decimal) variable. The question however seems to show that it want to convert a character to its ASCII code. This can be done more easily with prototyping e.g. char Text = 'A'; int Value; Value = (int)Text;
I have added a small example that shows some of the scanf codes (but often documented as printf codes) and where I have added a line where the first character of an input text is converted to its ASCII code.