go_away

Author Topic: How should I write a serial TTL monitoring program? (ATMega2561)  (Read 1636 times)

0 Members and 1 Guest are viewing this topic.

Offline siempre.aprendiendoTopic starter

  • Jr. Member
  • **
  • Posts: 32
  • Helpful? 0
I'm trying to write an ATMega2561 monitoring program that "hears" all the communication in the serial connection.

It's for the CM-510 controller of the Bioloid Premium kit, which use the ATMega2561 to control the AX-12 servos (which includes another AVR microcontroller)

Brief description about the protocol:

Protocol Type Half duplex Asynchronous Serial Communication (8bit,1stop,No Parity)

Link (Physical) TTL Level Multi Drop (daisy chain type Connector)

(Here more info about the bus protocol)

It should be possible because the CM-510 Robotis firmware includes a monitoring command, but they haven't published the source code.

I have been programming professionally for several years, mainly in C++, but I have very little experience with microcontrollers.

My final goal is to write a program which "hear" all the communications and answer the queries directed to him (id 200, 0xC8).

Could you help me please?

Thanks!

Offline Pratheek

  • Contest Winner
  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 3
Re: How should I write a serial TTL monitoring program? (ATMega2561)
« Reply #1 on: May 25, 2010, 06:34:51 AM »
There is an excellent tutorial on USART(serial communication) on this website. Go through it. The good thing is the tutorial explains serial communication for AVR. It doesn't specifically answer your requirement, but if you go through and understand it, it should be difficult for you to write a serial monitoring program.

Offline siempre.aprendiendoTopic starter

  • Jr. Member
  • **
  • Posts: 32
  • Helpful? 0
Re: How should I write a serial TTL monitoring program? (ATMega2561)
« Reply #2 on: May 27, 2010, 03:32:54 PM »
Thanks, Pratheek

I have managed to create a toss mode program, and then it's been very simple to create a "device mode" for CM-510.

It already answer queries for the IR sensors :)

Finally I have used the new Robotis libraries.

 


Get Your Ad Here

data_list