Hardware Serial Ports

I know the hardware serial port pins are P14/P15 (RX/TX) on the Atom PRO. Are these pins the same for the Basic Atom also?

I’ve been looking through datasheets and manuals and this is not shown anywhere for the Basic Atom as far as I can see. There doesn’t seem to be any mapping of functions to pins for the Basic Atom like there is for the Atom PRO.

8-Dale

The Pro is the only Atom with hserial.

It’s in the Basic Atom manual.

8-Dale

Ak! so it is… :blush:

After looking at the manual, I think hserin and hserout uses the DB9 connector on the Atom. There is no pin argument for the hserin and hserout commands.

OK. Does HSERIN and HSEROUT go to the DB9 like S_OUT and S_IN? Does S_OUT and S_IN use software serial and HSERIN and HSEROUT use the real hardware port?

8-Dale

I don’t know… :frowning:

I need to find out what the deal with HSERIN/HSEROUT is. I just got my Bluetooth module and antenna and need to decide how I need to connect it up.

I want to use HSERIN/HSEROUT if it would be faster than SERIN/SEROUT. I want to capture debugging info while W.A.L.T.E.R. is roaming around, and save it to a file for analysis after the run. I can’t accomplish this with the IDE.

If the HSERIN/HSEROUT uses the DB9, I think that will mess me up. I need TTL level serial communication between my Bluetooth module and the Basic Atom. I already know SERIN/SEROUT isn’t fast enough to give me the serial communication speed I need and it affects operation of the rest of the code - slows everything else down.

8-Dale

I don’t have my ABB with the atom with me right now, to try it myself. But if I did, I would probably write a simply program that simply kept outputing characters to the hardware serial port and I would either use a logic probe or the little scope and would simply try each of the IO pins until I found one that was outputing stuff.

Just a thought

Kurt

This morning I had a chance to hook up my Basic Atom with a battery and tried the hserial on it. My experiments I think show that the hardware serial port on the Atom is on P14 and P15 as well. However the pins may be reversed.

The first test was to to simply put a HSEROUT in a loop and used the logic probe and checked to see which pin showed any output. That turned out to be P14

I then modified the program to loop on an hserstat looking for input and if I got any input I would beep and read one character. I then did a normal serout on P0 at the appropriate baud rate and using a jumper I jumpered P0 to each of the other pins until I got beeps. This turned out to be P15

I hope this helps

Kurt

I have the Atom Pro 28 on the ABB. The ABB’s P15 is hooked into the RXD pin of the SSC-32 via the included yellow and black 3-pin connector to 2-pin connector cable. I’m looping this in my code:

;Commands to be sent out (TXD, P15)

hserout “#”, DEC RH_CH, “P”, DEC RH_CTR, “#”, DEC LH_CH, “P”, DEC LH_CTR, “#”, DEC RTIO_CH, “P”, DEC RTIO_CTR, “#”, DEC LTIO_CH, “P”, DEC LTIO_CTR, “#”, DEC RTFB_CH, “P”, DEC RTFB_CTR, “#”, DEC LTFB_CH, “P”, DEC LTFB_CTR, “#”, DEC RK_CH, “P”, DEC RK_CTR, “#”, DEC LK_CH, “P”, DEC LK_CTR, “#”, DEC RA_CH, “P”, DEC RA_CTR, “#”, DEC LA_CH, “P”, DEC LA_CTR, “#”, DEC RFL_CH, “P”, DEC RFL_CTR, “#”, DEC LFL_CH, “P”, DEC LFL_CTR, “T”, DEC ttime, 13]

pause 3000

;Commands to be sent out (TXD, P15)
hserout “#”, DEC RH_CH, “P”, DEC RH_CTR, “#”, DEC LH_CH, “P”, DEC LH_CTR, “#”, DEC RTIO_CH, “P1638”, “#”, DEC LTIO_CH, “P1638”, “#”, DEC RTFB_CH, “P”, DEC RTFB_CTR, “#”, DEC LTFB_CH, “P”, DEC LTFB_CTR, “#”, DEC RK_CH, “P”, DEC RK_CTR, “#”, DEC LK_CH, “P”, DEC LK_CTR, “#”, DEC RA_CH, “P”, DEC RA_CTR, “#”, DEC LA_CH, “P”, DEC LA_CTR, “#”, DEC RFL_CH, “P1725”, “#”, DEC LFL_CH, “P1525”, “T”, DEC ttime, 13]

What the first hserout does is it centers my servos so that my biped scout stands straight up. The second hserout makes it shift its weight to the right.

Since I’m looping it, I can tell that the commands are being sent out of P15 correctly with and received correctly on the RXD pin of the SSC-32…

If you take a look at the Atom Pro 24 datasheet (since the 28-pin Atom Pro’s datasheet isn’t available), P14 and P15 of their development board shows the pins as multiplexed. P14 and P15 is a software I/O in one mode and a hardware RXD and TXD (respectively) when the “enablehserial” is compiled in.

But sadly, the hserout and hserin commands does not do anything to the S_IN and S_OUT. According to their documentation, those are just ports to flash the code into the Atom Pro.

For now, I have my SSC-32 configured to accept commands from the DB9. I’m going to jack in the ABB when I get all my values for my walking gait.

Just wanted to write in a confirmation on the HSerial pins, Atom vs AtomPro. Atom does have hserial and it uses P14 and P15 for it just like the AtomPro. However on the Atom the RX and TX are reversed compared to the AtomPro. So RX on the Atom is TX on the AtomPro and TX on the Atom is RX on the AtomPro.

For those curious why we did this it all comes down to how the RX and TX pins are aranged on the physical ports of the processors used by each module.

Also S_OUT and S_IN are just regulat I/Os with inverters on them. This means they can be used with software serial commands but not much else.