I’m using the mini ABB and i want to connect a transceiver to it and am currently looking for one that fits. assuming the transceiver has TTL and RS232 (DB9) capability, how do I connect it to the mini ABB. (I’m using the basic atom Pro 28 pin MCU if that helps.
Which pins on the ABB have TTL capability?
Are you talking about Bluetooth, WiFi, ZigBee, or some other kind of wireless link? There are versions of each of these that have TTL level I/O and can connect directly to pins on the ABB.I’m not sure what you mean by “one that fits,” though.
Why do you need both TTL and RS-232 capability?
If you are talking about a wireless connection, you only need one or the other (TTL OR RS-232). The Atom PRO has a hardware serial port that can be used with the HSERIN and HSEROUT commands and require you to use pins P14 (RXD) and P15 (TXD). These are still TTL level pins, unless you use an RS-232 level shifter.
Most of the pins of the ABB have TTL levels. The exceptions are when you are using analog inputs. If you use the hardware serial port, you have to use specific I/O pins (still TTL level).
any chance you can use USB on the PC end? the bluetooth devices can be configured to be a virtual COM port so your program on the PC would not be impacted at all.
Hi Eddie.
I don’t want to get into the BlueTooth stuff since it’s too expensive for me right now. I need 4 of them and they cost aroud 60$ each. I’ll stick with the cheaper transceivers for now.
Actually, I’m thinking of buying a few Spark Fun UM96 433MHz wireless modems. I think they’ll be adequate for now.
sorry, you probably already said that and I missed it.
those seem pretty straight forward and they have 8 channels as well. on the PC end you will need an rs-232 converter and a power supply. are you planning on using multiples of these on the PC end or having all on the same channel and using a software protocol to address each remote individually?
to your orriginal question though, I would recommend using the hardware serial port (hserin/hserout) on your BAP if you do not have it assigned to something else. I do not see any easy way to send a handshake back to the PC using these modems so it would be difficult using the bit-banged serin/serout commands in real time and be certain to never miss a character from the PC.
The DB9 pins on the ABB is not the same IO ports on the BAP as the hardware serial port. The DB9 pins are logically S_IN and S_OUT and there is sortware bit bang functions that process these. They work reasonably well for things, but for example if you are receiving information from your PC and your BAP program is not in a SERIN commmand you will not properly receive this data. This is one area where the hardware serial port of the BAP is very benificial, the hardware will receive the information and the underlying software of the BAP will buffer this information up for you until your program is ready to receive it.
However the hardware serial port is not connected to the DB9 port but is instead I believe P14 and P15 on the ABB. The output at this point is TTL and not in RS232 format. This is where you would either need your IO device to be able to handle TTL level signals or you would need to wire in something like a MAX232 and supporting hardware that would convert the signals to RS232.
I hope my ramblings were reasonably coherant as I am still on my first cup of coffee!
heh, coffee… I use diet coke but the net effect is similar I think
ok I went and looked a bit closer at the sparkfun modules and it appears they have both TTL and rs-232 output pins. that rocks! On the PC end you use the rs-232 pins wired to a DB-9F. On the ABB+BAP end you use the TTL pins wired to P14 and P15.
re: db-9 on the ABB, it is only a half-duplex connection and only accessible using the software driven serial functions as kurte indicated.
Good morning Kurt. I’m actually on pretty much the other side of the world so i’ll be heading to bed soon. No coffee for me!
Thank you both. both of you get 10 out of 10 for your answers.
Just two more questions:
If I plug the PC end to rs-232 DB9 port and the other unit to the TTL pins on the ABB, could the two wireless units understand each other? Do they do the translation between protocols “behind the scenes” or do I have to add anything in between?
Is there a book or any tutorial which explains all the pins’ stuff etc’…?
finding everything bit by bit is wayyyy slow!
thx again