Hi,
i work on flowcode V5 and i don't know how to convert a value from hexadecimal to decimal. I saw this function NumberToHex$() but no the reverse.
Thanks
Flouch
Convert Hex to dec
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: Convert Hex to dec
Good evening.
When a number is a string you can represent it as hex or decimal for display purposes. When a number is stored as an integer it has no base - hex or decimal, it is the same thing.
What is it you need to do the conversion for?
Jonny
When a number is a string you can represent it as hex or decimal for display purposes. When a number is stored as an integer it has no base - hex or decimal, it is the same thing.
What is it you need to do the conversion for?
Jonny
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Convert Hex to dec
I did an article that includes a flowchart which will convert hex to decimal and decimal back to hex.
Can be found here:
http://www.matrixmultimedia.com/article.php?a=416
Martin
Can be found here:
http://www.matrixmultimedia.com/article.php?a=416
Martin
Martin
-
- Posts: 29
- Joined: Thu Oct 18, 2012 10:19 am
- Has thanked: 6 times
- Been thanked: 1 time
- Contact:
Re: Convert Hex to dec
Hi thanks for answer i need to do this programs (a part of my main programs)JonnyW wrote:Good evening.
When a number is a string you can represent it as hex or decimal for display purposes. When a number is stored as an integer it has no base - hex or decimal, it is the same thing.
What is it you need to do the conversion for?
Jonny
Read the RSSI status register
2) Convert the reading from a hexadecimal
number to a decimal number (RSSI_dec)
3) If RSSI_dec ≥ 128 then RSSI_dBm =
(RSSI_dec - 256)/2 – RSSI_offset
4) Else if RSSI_dec < 128 then RSSI_dBm =
(RSSI_dec)/2 – RSSI_offset
( http://www.ti.com/lit/ds/symlink/cc2500.pdf page 35)
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: Convert Hex to dec
Hello.I see - I think the data sheet is a little unclear here.
The value is already a decimal - Twos-compliment is the format that most processors store their integers in now.
If I were you I would just skip this step and see if this works for your results, as I am unsure as to why a data sheet would add something that confusing.
Cheers,
Jonny
The value is already a decimal - Twos-compliment is the format that most processors store their integers in now.
If I were you I would just skip this step and see if this works for your results, as I am unsure as to why a data sheet would add something that confusing.
Cheers,
Jonny
-
- Posts: 29
- Joined: Thu Oct 18, 2012 10:19 am
- Has thanked: 6 times
- Been thanked: 1 time
- Contact:
Re: Convert Hex to dec
ok i will see with out the conversion thanksJonnyW wrote:Hello.I see - I think the data sheet is a little unclear here.
The value is already a decimal - Twos-compliment is the format that most processors store their integers in now.
If I were you I would just skip this step and see if this works for your results, as I am unsure as to why a data sheet would add something that confusing.
Cheers,
Jonny
I got a question i don't have on my laptop any RS232 because i want to send the data on RS232 and read on the Hyperterminal. But with windows7 and no RS232, how send data on laptop and read them?
Thanks again
E/ i work with E-blocks USB PICmicro multiprogrammer board
Eé/ NVM i just buy a LCD screen
thanks again, i will just send the data in the LCD screen should work