Yes, I noticed the table. Perhaps the command type could be included, if I understand you correctly.
I'd consider defining a set of constants for the pin names, 33 for ADIN might become 33AD (or SOUT, of course). Hservostat 33 could become HS33. Actually, if we have macros, then they could be made to appear more like a subroutine call passing the port #. (which is probably what they are?).
Does the BAP compiler even know about the "raw" uP pin numbers like //P56? I know you are writing C (and Basic) library commands, and use these designations, and that we need to be able to relate to the actual hardware pins on the uP, but yeah, I can still be called "confused" until I can work through some of these pin references in working code on my 'bot.
A link to the HBRobotics "Table Top Challange" pix and videos. Micromoose and I are in it, I've got a bright blue shirt on.
http://picasaweb.google.com/DruaiRobotics/HomebrewRobotics102710#ARC-32 and RoboClaw on board! Also a BAP.
Thanks!
Alan KM6VV
KurtEck wrote:
Yep as I said I find it confusing as well.
From a previous post, I believe:
Code:
// P56 VS1 (PB0/AN0)
// P57 VL (PB1/AN1)
// P58 VS2 (PB2/AN2)
So on the Arc32 you have:
Logical pin P57 (commands like input/output ADIN) connects to the internal H8 pin PB1 which has an alternative pin usage AN1 (i.e. it is an analog input pin), but to use hservostat you must use logical pin 33) which should not in these cases be confused with p33 which is actually S_OUT...
Which is why this section of the pin out table in the Arc32 manual is confusing:
Code:
P32 • Analog Pin.• Detects S1 Voltage.
P33 • Analog Pin.• Detects Logic Voltage.
P34 • Analog Pin.• Detects S2 Voltage.
P35 • Analog Pin.• Detects AUX1 Pin 6 Voltage.
S_IN • UART1 RX.
S_OUT • UART1 TX.
P34 • SCL.• AUX1 Pin 1.
P35 • SDA.• AUX1 Pin 2.
P36 • UART2 TX.• AUX1 Pin 3.
That is there are four pins that are duplicates, but not. It depends on which command is used...
Hopefully I made it as clear as mud

Kurt