Hyperterminal interface

Baby Orangutan B-328
Orangutan USB AVR controller
Windows XP
Hyperterminal

Hello! I am sorry for being a remedial doofus, but can someone please post a short snippet of code showing me how to send a variable’s value through the USB controller to hyperterminal? I have been searching the documentation, and searching this forum, and it is incredibly frustrating because I imagine it must be so obvious. I’m really more into the hardware side of things, and I would just like to peek at variables here and there to help with debugging.

Hello.

What is an “Orangutan USB AVR controller”? Are you referring to our USB AVR programmer, our older Orangutan USB programmer, or something else?

Have you installed the Pololu AVR library? Basic serial communication with the Baby Orangutan is pretty easy using the serial functions in our library, but to give you detailed instructions I first need to be sure what hardware you’re using as your USB-to-serial adapter.

- Ben

Yes I am using (or trying) the USB AVR programmer. And I installed the AVR library. And I agree that it is way easier to use than the Nerdkits PIC I was using before. However, I just cannot see any data that I use serial.send with. My USB AVR programmer gets assigned COM9 for the serial interface - is that a problem? I recall with the Nerdkits one it had to be COM1.

Thanks for your reply. I am losing hair over such a simple thing!

First let’s make sure you are connecting the programmer to your Baby Orangutan properly. In order to use the programmer as a USB-to-serial adapter, you need to connect Baby Orangutan pin PD1 to programmer pin RX (this lets you transmit data from the Baby Orangutan to your computer). Note that your Baby Orangutan and the programmer also need to have a common ground (i.e. connect Baby O GND to programmer GND). If you want to transmit data from your computer to the Baby Orangutan, you should also connect Baby Orangutan pin PD0 to programmer pin TX.

The next thing to get right is the COM port. Look for the entry “Pololu USB AVR Programmer TTL Serial Port” under the “Ports (COM & LPT)” section of your Device Manager to determine the COM port of your programmer’s USB-to-serial adapter. This is the COM port you should be connecting to with your terminal program. COM9 should be fine, but ultimately that depends on the terminal program you are using (e.g. I know a version of Tera Term that cannot handle anything over COM4). You do not want to be connecting to the programmers programming COM port.

Finally, make sure you are using the appropriate baud rate. In your code, you should be calling serial_set_baud_rate() to set the baud rate, and you should make sure your terminal program establishes a connection using this same baud rate.

I suggest you verify your connections and then write a very simple program that just transmits a character ever second. For example:

char buffer[1] = {'A'};
serial_set_baud_rate(9600);
while (1)
{
  serial_send(buffer, 1);
  delay_ms(1000);
}

If you connect to the appropriate COM port with a baud rate of 9600 bps, you should see the letter A appear every second. Please let me know if this doesn’t work for you.

- Ben

We have success. I am embarrassed to admit I did not actually think I needed to connect to the TX and RX - I thought the 6 pin AVR ISP connector had that connection already. Also, I think the ground IS in the AVR ISP connector right? I don’t need to make a separate connection to ground from the baby O do I? I thought that was pin 6.

I really appreciate your taking the time to explain this elementary step that was just killing me. I will now be able to move on with other more fun stuff! THANKS!

I’m glad to hear you have it working. You are correct: if you have the 6-pin programming cable connecting your programmer and Orangutan, you do not need a separate ground connection.

- Ben