Programming Differences between AtomPro28 - ARC-32

im just seeing id i can collect info on the ARC32 before i purchase one.
im not a pro in programing, although i can/have written some of my own code and i do understand how things work with the Atom pro, botboard and SSC32. “Simples”

currently many of my projects use implementation and re-writes of Xans phoenix code 1.3 & 2.0 so im looking to see a fully converted version of this code for the ARC-32 to study.

thanks in advance.

Hi, I will try to give at least some of the differences, as I was the one who went through and converted the phoenix code to run on it. (Note: Nathan did this as well…)

Some of the obvious: More code space, More EEPROM…

Arc32 runs at 20mhz where as the Bap28 runs at 16mhz. So Simple timing loops may have to be adjusted.

HServo2 versus HServo. - Arc32 with HServo2 has hardware support for doing the hservo commands. So it has a lower overhead to the processor. Also The values you pass into Hservo command change as the value you pass in for pulse width depends on clock speed.

HSerial/HSerial2: The Arc32 has 2 hardware serial ports. The first one HSERIAL is used by S_IN/S_OUT. HSerial2 is on one of the Aux connectors of the board. So if you are using HSerials in your program you will probably need to move them to HSerial2 (I did this with XBee stuff). Nathan made some hacks for me, such that if you are only using one of the hardware ports, you can simply change ENABLEHSERIAL to ENABLEHSERIAL2 and your commands like hserout, will go out to the only enabled hardware serial port. However if you wish to use both, then you will need to change all of these to the appropriate commands hserout2, hserin2… Plus side, with S_IN/S_OUT on system buffered hardware port that is not half duplex, your program can do some nice things with serial input from the USB port. I use this on my Arc32 phoenix to have a keyboard monitor that allows me to turn on/off debug, dump stuff, enter servo zero offset mode…

Analog pins/Digital pins/Hservo pins - Not sure how to say this, but not all IO pins that you can do hservo to, can be used as digital input pins. Also there are some new commands to allow you to use them as analog pins… The new commands are described in the data sheet.

TImer clock: The hservo2 sub-system exports a system clock, that you can ask for it to be scaled. Again the command details are in the Arc32 data sheet.

Arc32 does not have a speaker - I missed this so I purchased a small speaker from Radio shack (273-0092). Make sure not to get a buzzer… Mine is not amplified, but is laud enough for me. I usually put some tape over the speakers on the BB2 as my office is near the bed room…

The Arc32 has a couple of status LEDS that you can set, which have some predefined pin numbers. It does not have any buttons to use…

The Arc32 is based on a different H8 chip, which as some differences, Some in particular that hit my code include:
Arc32(3687) Does not have TimerA but instead has TimerB1. So any code that uses it or it’s registers must change (TMA->TMB1)… Likewise it does not have TimerW but instead has a dual channel TimerZ. Again any code that uses it would need to change…

That is all for now.
Kurt

Hi Jonny,

Take a look at this thread/post.
I’m using that code as a base for my biped.

thanks Kurt, for confusing me… lol
no seriously, thanks for the info. i think its best i gain as much info about the ARC before i purchase one. :wink:

thanks for the link Kåre, very help full. i will look over it shortly. :wink:

Pretty well described, Kurt.

Also the 2x4 pin Aux2 header is laid out for 4 buttons. All you have to do is attached one side of a button to the I/O pin and the other to the ground pin. There are builtin pullups already on those I/Os.

Servo pin 0 to 7, 16 to 23 and 28 to 31 can be used as digital outputs and can be used with any BasicAtomPro commands(eg serin,serout,pulsin,pulsout etc…). All servo pins can be used as digital inputs, however pins 8 to 15 and 24 to 27(12pins) can only be used as inputs using the hservostate command and so can’t be used with input comands like serin,pulsin etc…

All the I/Os on the AUX headers can be used with all AtomPro commands as well.

Pins 8 to 15 and 24 to 31(16pins) are analog capable. You can get their analog value using the HservoState function. Also the Aux1 header has one analog pin that can also be read using HservoState. The 3 input voltages Vl,Vs1 and Vs2 can also be read using HservoState(these three are voltage divided by 10).