go_away

Author Topic: UART confusion..?  (Read 1353 times)

0 Members and 1 Guest are viewing this topic.

Offline Selenaut-14Topic starter

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 0
  • Making the $125 robot...
UART confusion..?
« on: July 08, 2010, 01:45:05 PM »
Okay, so I was thinking that an LCD would look nice on the $50 robot. I do understand that this will up the price of the robot significantly, but I don't know how to put it on. Any help? I was thinking of using the LCD here:

http://www.sparkfun.com/commerce/product_info.php?products_id=256
The answer is always yes if it is never no.
--------------
SKILLS:

Building- great
Coding/programming- good
circuitry- pitiful

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: UART confusion..?
« Reply #1 on: July 08, 2010, 02:04:31 PM »
You can get a 16x2 display on ebay for like $5 shipped


It uses the popular HD44780 LCD controller, so search "avr hd44780" and there will be tons of example code (usually with instructions on pin connections)

Offline Selenaut-14Topic starter

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 0
  • Making the $125 robot...
Re: UART confusion..?
« Reply #2 on: July 08, 2010, 02:22:03 PM »
Okay. Thanks.
Btw, do you think the LCD will fit on the $50 robot?
The answer is always yes if it is never no.
--------------
SKILLS:

Building- great
Coding/programming- good
circuitry- pitiful

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,652
  • Helpful? 169
    • Society of Robots
Re: UART confusion..?
« Reply #3 on: July 08, 2010, 02:35:35 PM »
The easy way is to get a serial based display, just hook up power/ground/tx (three wires, like a servo). A minute of effort.

Then use WebbotLib to program it in like 5 seconds.

done.

Of course, you could spend $10 less and spend an entire day to get it to work . . . ::)
« Last Edit: July 08, 2010, 02:47:48 PM by Admin »

Offline Selenaut-14Topic starter

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 0
  • Making the $125 robot...
Re: UART confusion..?
« Reply #4 on: July 08, 2010, 05:05:41 PM »
And do you have any idea how to do that? PLEASE, if I ever get an LCD I need to know how to this. :'(
The answer is always yes if it is never no.
--------------
SKILLS:

Building- great
Coding/programming- good
circuitry- pitiful

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,652
  • Helpful? 169
    • Society of Robots
Re: UART confusion..?
« Reply #5 on: July 08, 2010, 05:33:33 PM »
Purchase one of these:
http://www.sparkfun.com/commerce/advanced_search_result.php?keywords=serial+lcd&x=0&y=0&search_section=products

Attach the power wire to your 5V. Attach ground to ground. And attach the Rx of the display to the Tx of your microcontroller. Done.

Then download/install WebbotLib, and read the manual about displays and the $50 Robot. It'll explain everything.

Offline Selenaut-14Topic starter

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 0
  • Making the $125 robot...
Re: UART confusion..?
« Reply #6 on: July 08, 2010, 06:49:52 PM »
I'm thinking about the nice one:
http://www.sparkfun.com/commerce/product_info.php?products_id=9351
But i dont know if it will work with an ATmega8.
If  it can, I would be very happy.
The answer is always yes if it is never no.
--------------
SKILLS:

Building- great
Coding/programming- good
circuitry- pitiful

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: UART confusion..?
« Reply #7 on: July 08, 2010, 08:43:03 PM »
It will.
Howdy

Offline Selenaut-14Topic starter

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 0
  • Making the $125 robot...
Re: UART confusion..?
« Reply #8 on: July 08, 2010, 09:01:12 PM »
Yay! ;D
The answer is always yes if it is never no.
--------------
SKILLS:

Building- great
Coding/programming- good
circuitry- pitiful

Offline Conscripted

  • Robot Overlord
  • ****
  • Posts: 291
  • Helpful? 10
Re: UART confusion..?
« Reply #9 on: July 08, 2010, 10:50:38 PM »
This was posted on the product page you linked

Additionally, all source code for the ATMega168 processor is compiled using the free WinAVR compiler and is free for downloading.

The ATMEGA168 has the same pinout as the ATMEGA8 and they speak the same language.

Offline Selenaut-14Topic starter

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 0
  • Making the $125 robot...
Re: UART confusion..?
« Reply #10 on: July 08, 2010, 11:06:51 PM »
One final thing to put on and I'm done: three buttons. Any way I could fit these in as a left, right, and select button for an interface? I believe I'm beginning to run out of room.

I would have:

2 servos
2 photoresistor sensors
1 RS232 Shifter board kit (see uart tutorial)
1 LCD screen
3 buttons

I haven't ordered anything yet, so if I need something larger in terms of microcontrollers I can get it. I'll just need to know how to substitute the 8 with the new one in the $50 robot circuitry.
« Last Edit: July 08, 2010, 11:23:04 PM by Selenaut-14 »
The answer is always yes if it is never no.
--------------
SKILLS:

Building- great
Coding/programming- good
circuitry- pitiful

Offline Joker94

  • Supreme Robot
  • *****
  • Posts: 1,119
  • Helpful? 26
Re: UART confusion..?
« Reply #11 on: July 08, 2010, 11:23:18 PM »
yeah you will have room. the 8 has 18 digital pins that i know of and can take more than 5 ADC inputs.

2 servos will take 2 digital PWM capable pins
2 photo resistors will need 2 ADC pins
3 buttons will need 3 ADC pins
1 LCD will need the TX line.

that is 5 ADC pins and 2 digital pins and the TX pin which is also a digital pin.

so you have plenty of room to work with.

Offline Selenaut-14Topic starter

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 0
  • Making the $125 robot...
Re: UART confusion..?
« Reply #12 on: July 08, 2010, 11:24:50 PM »
Check again, I forgot the shifter board.
The answer is always yes if it is never no.
--------------
SKILLS:

Building- great
Coding/programming- good
circuitry- pitiful

Offline Selenaut-14Topic starter

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 0
  • Making the $125 robot...
Re: UART confusion..?
« Reply #13 on: July 09, 2010, 12:02:30 AM »
Removing the need for two of the buttons: I could just use this:
http://www.sparkfun.com/commerce/product_info.php?products_id=9426
The answer is always yes if it is never no.
--------------
SKILLS:

Building- great
Coding/programming- good
circuitry- pitiful

Offline Joker94

  • Supreme Robot
  • *****
  • Posts: 1,119
  • Helpful? 26
Re: UART confusion..?
« Reply #14 on: July 09, 2010, 12:11:11 AM »
well I assume your talking about a rs232 shifter board.

if so then you cant have both the LCD and the shifter board as they both need the TX line of the UART and the Atmega 8 only has 1 UART

so it will be 1 or the other. unless you use a wireless interface to communicate from your PC to the MCU over I2C e.g. something like Bluetooth.

Offline Selenaut-14Topic starter

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 0
  • Making the $125 robot...
Re: UART confusion..?
« Reply #15 on: July 09, 2010, 09:41:52 PM »
But I thought I needed the board in order for the LCD?
The answer is always yes if it is never no.
--------------
SKILLS:

Building- great
Coding/programming- good
circuitry- pitiful

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: UART confusion..?
« Reply #16 on: July 09, 2010, 10:48:24 PM »
the rs232 shifter is for connecting the microcontroller to the computers serial port. you do not need it for the serial lcd

Offline Selenaut-14Topic starter

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 0
  • Making the $125 robot...
Re: UART confusion..?
« Reply #17 on: July 10, 2010, 11:32:08 AM »
So I can only use one at a time then.
The answer is always yes if it is never no.
--------------
SKILLS:

Building- great
Coding/programming- good
circuitry- pitiful

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: UART confusion..?
« Reply #18 on: July 10, 2010, 11:37:40 AM »
yeah, one at a time.

Offline Selenaut-14Topic starter

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 0
  • Making the $125 robot...
Re: UART confusion..?
« Reply #19 on: July 10, 2010, 01:46:14 PM »
Okay. So ill mount both and ill plug in the one i need when i need it.
The answer is always yes if it is never no.
--------------
SKILLS:

Building- great
Coding/programming- good
circuitry- pitiful

 


Get Your Ad Here