Page 1 of 1
Posted: Sat Apr 13, 2002 4:27 pm
by Newman
I have the 204-25, working good with my C++ control until I got to GPOs. For one, on power up alone (no serial connection at all, thought maybe power was coming through there), G5 terminal is on and the polarity seems goofy too, as if all the + pins (furtherest from the edge) are on but the only - pin 'on'(ref to ground) is the G5 pin because my LED lights up from any + to the G5 negative?! I read someone got their GPOs working after running the demo program and runngin that only lets me toggle output 1 with no repsonse and the G5 situation remains?!
Onaside, how do you send in C++ a hex command? Just send the int followed my h?
I am in a real bind with this, so any ideas welcome!!!!
Posted: Sun Apr 14, 2002 1:47 pm
by Thlayli
Hexidecimal is just another method of displaying integers. In C, these two statements would be equal:
<CODE>
int decimalInt = 32;
int hexInt = 0x20;
</CODE>
The only difference is in how to interpret the number (the 0x specifies that it is hex), but the computer will use a third representation to represent the number, specifically called two's compliment, which I won't get into. Anyways, the reason hex is used is because it can easily be translated into binary, which is what the computer uses, for instance a common number you see in decimal is 255, which is the highest number that can be represented in 8 bits of binary, or 11111111, and hex is further used because it simplifies reading of the binary, since each 4 bits signifies one hex digit, that specific one is 0xFF. Ok now that you are filled with useless knowledge, have fun
<font size=-1>[ This Message was edited by: Thlayli on 2002-04-14 13:48 ]</font>
Posted: Sun Apr 14, 2002 9:17 pm
by Newman
Thanks for the code help, however, I still don't know why on start up and after with no commands given to the module, the G5 terminal is on? Is this normal and some kind of power indication?
Posted: Mon Apr 15, 2002 6:58 am
by Thlayli
Oh, sorry, I have no idea, I haven't messed with that model yet, I'm just an innocent code monkey
<font size=-1>[ This Message was edited by: Thlayli on 2002-04-15 06:58 ]</font>