NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » Programming with serial port

April 12, 2011
by carlhako
carlhako's Avatar

Is this possible?

I have temporarily misplaced the usb->serial converter that came with my nerdkit. I will probably have to order a new one lol

I have tried programming via the onboard com port on my desktop pc as well as a usb->serial port converter i bought off ebay a while back. I am using com port pin5 -> ground, pin 2,3 -> pin 2 & 3 on the MCU.

When i try to program the port winavr pretty much says it cant find the programmer and are you sure its a avr109.

When i hookup a chip that I was working on last time i had my nerdkits programmer and was outputting debugging info like variable values etc i get all garbage scrolling through putty. When i press reset or put it in programming mode it stops. I have tried swapping the TX and RX pins around on the MCU to make sure that is correct, one way i get no output the other i get the garbage. I also get the same response from the usb -> serial converter and the onboard one. I have also tried changing device manager settings the speed defaults to 9600, i bumped that upto 115200 which didn't seem to make any difference.

I also have the chip powered by a external 5v power supply which is almost right on the 5v mark.

Thanks

April 12, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Mark,

Using a different USB-Ser converter should technically be possible, but there are alot of variables that could be affecting you. The most likely culprit is the different levels and inversions that happen on the RS-232 protocol. Connecting directly to the serial port will probably not work without inverting the signal first, and probably level shifting it down to 5V. Your USB-Ser adapter that you bought might also be inverting the signal to make it compatible with RS232 in which case you would have to invert it back. Sorry I can't be of much more help.

Humberto

April 12, 2011
by Noter
Noter's Avatar

Here's a good circuit to convert between the nerdkit and RS232. The led's blink during transmission which is nice so I can see if things might be working as expected. I've been this one for a few weeks and it works good. You could skip the usb cable for now and go direct to an old fashioned com port if your computer has one.

RS323<->TTL

April 12, 2011
by carlhako
carlhako's Avatar

Thanks for the replies.

Noter I have ordered the parts to make your circuit, I like the status LEDS. I should get the parts tomorrow I will post how I go.

I also purchased a 5v rs232 which apparently will do the conversion.

April 13, 2011
by carlhako
carlhako's Avatar

its a MAX232 rather

April 14, 2011
by carlhako
carlhako's Avatar

Hey Noter

I put the circuit together on a breadboard and works perfectly. Thanks Again :)

Post a Reply

Please log in to post a reply.

Did you know that signed numbers need to be sign-extended when chaging variable sizes? Learn more...