Orangutan Project

So, I bought an Orangutan, forgetting that one of the projects I needed it for would need to talk to it over RS232.

So, looking into it further, it looks like the built in UART ports are brought out to headers. So, I could build an adapter cable that connects ground, send and recieve to a DB 9 connector. Is this the case, or do I need to do some signal conditioning here… the RS232 port on my USB-to-serial cable signals + and - 5V, so I guess that’s sorta TTL compatible-- I need to invert the signal? Can I use the serial interface on the 8 port servo controller schematic as a guide?

Also, is it difficult to write code to support RS232 communication? (I’m an experienced programmer, but a newbie to modern electronics and embedded controllers.) I’m assuming its a matter of writing some C code that loads data into the UARTS registers, and polls or responds to an iterrupt when data comes in.

The other things I need to do with it are make an I2C interface, and drive some motor controllers by simulating an RC reciever.

Also, I’m sure you’re busy working on the documentation, but some brief early stuff could – for instance, a copy of, and instructions for loading-- the test program that comes with it. At least this way I can get the board back to a known good state.

My plans are to load the AVRX OS on it, and a bootloader for last minute code changes… but I’m not sure that the two are compatible yet. LOL.

Also, later this year, I’ll find out how well the LCD display survives in an antweight combat robot.

Hello,

-5 V is definitely not TTL-compatible, so don’t connect it to your I/O lines! Microcontroller I/O lines are typically not designed to handle voltages above or below the power rails.

So, you will need some kind of level-adapter and inversion circuit. Using just the transistor and two resistors can be a quick solution if you only need to send data from the computer to your device. If you need communication in both directions, you can get a MAX232-type IC to do the level conversion.

Serial communication is usually quite straightforward when the microcontroller has a UART, and your characterization of the required steps is accurate.

We expect to have more documentation and a sample project up by Monday.

Protect that LCD!

- Jan

So, maybe a more robust solution would be to buy your USB-to-Serial adapter. The only thing that has me hesitent there is that it will be talking to a Macintosh.

There are Mac OS X drivers for prolific chips, and some other standard Serial USB controller chips… but I don’t know which controller you used.

What’s the status of Mac drivers? Or, are you in the situation where you don’t have a Mac to test against… if so, I’d be willing to try and get something together, either using the chip manufacturers off the shelf driver (if its a standard chip) or using the Linux libusb library, which has been ported to the Mac.

For combat, I will protect the LCD, as well as the whole board…

Thanks for the earlier advice… If a mac driver is an unlikely possibility, I do know there are USB to serial products made for cellphones that have been hacked into working… and I believe the cellphones use 3.3v signaling.

Ok, I’ve determined that the Cygnal CP2101 is the USB to UART chip, and that drivers do at least exist on the CD that Silicon Labs ships with their eval kit. Here’s their instructions:

“To install the Macintosh OS-X virtual COM port driver, extract the cardinal-osx-V1_00c-release.zip file located in the MACX directory created in Section 2.1. Next, run the extracted file SLAB_USBtoUART Installer. To uninstall the driver, run the extracted file SLAB_USBtoUART Uninstaller.”

These drivers are royalty free, but shipped only with their eval kit.

If you’re willing to send me the driver I’ll do my best to get it working, and then you could add OS X to your supported OSes. I’d only want to be able to return it if I can’t get it to work.

Hello,

We have had a few customers try the Mac driver, and the results were not good. The driver provided with the evaluation board is set up specifically for the silabs default vendor and product IDs, so we need to get a modified version to work with the USB adapters configured with our custom data. Silabs is supposed to be releasing the Linux driver source this month, so that might help some of the Mac folks, too.

- Jan

I’ve succeeded in programming the Orangatan using a Mac. I used avr-gcc 3.4.3. I basically followed the instructions given on your Linux walkthru verbatim.

I ran into trouble initially in getting the tools to build, or the right set of tools-- the AVR tools in Fink are outdated… building from sources worked when I followed your instructions (Rather than the “how to build these for the mac” instructions I found on the web.)

I had to move an object file into the project directory because for whatever reason make was not looking in the right place for them. Also, I had to change the makefile to point to the include files directory. Whatever lets GCC know where its environment is isn’t quite working (possibly because I put all the avr stuff in a place that wasn’t /usr/local.)

I’ve only loaded the blinken light example so far. Been meaning to look up the info on the LCD and try sending text to it…

I was using the AVRISP bought from DigiKey and uisp to do the programming.

This all should integrate well into Xcode, and for preliminary suggestions for how to do it, other Mac users can check out:
macdevcenter.com/pub/a/mac/2 … edded.html