Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: pathakh on May 05, 2010, 03:09:19 AM
-
hi,
i have some confusion, regarding the functioning of the axon2 microcontroler.
the project which i have started requires axon2 to work in real time, i mean after converting the usb port to serial port i want to connect the axon to computer and want to see if it works in realtime after giving the instructions in the program, is it possible to make it function this way i mean say i connected a serv to axon and give running comand directly via pc ,or i have to program it 1st and the operate it as standalone , which in my case will not be possible as i have a complicated software and hardware which cannot be used to run the program stand alone.
awaiting replies.......
-
Sure it does. Look here.
http://www.youtube.com/watch?v=Rgjo_33rH0Y# (http://www.youtube.com/watch?v=Rgjo_33rH0Y#)
I know it's bluetooth, but it also works via USB as well as UART.
-
thanks christi for the answer,
actually the software which i am using supports only serial ports , so i want to convert axon out put from usb to serial and operate the motors and other sensors ,which are connected to axon through the computer, so as i saw in the video there are some code , but if i use the software will it be ok .
-
How you convey data to the Axon, is a different affair. But the Axon is capable of detecting data as soon as it reaches it, and respond accordingly, in realtime (obviously, there will be a slight delay, albeit measured in microseconds). So if you press a key on your keyboard, send that data via a serial port, then sending it into the Axon, it will respond as soon as the data reaches it.
For software examples, i think there are some tutorials on the SoR site (the link is at the top of the page). Also, Webbot's library has routines to deal with data coming via UART (data received via USB is converted to UART, then sent to the processor; but you shouldn't worry about that). You should check out his library for more info.
If i am not mistaking, there are usb to serial adapters. Just do a search on your favorite electronics dealer. They should have some in stock.
All you need to do is tell your code to send data via serial port, then use a usb to serial adapter to plug the Axon to your serial port, and then have the Axon parse whatever data it receives, and act accordingly. It's definitely doable.
Good luck.
-
Hi,
Or just set up your computer to use the right com port. USB ports can be set up to look like a common COM port to the software. Alternatively, use an API.
Btw. This doesn't make it anymore or -less "realtime" and I don't see why this term enters the formula?
-
The term 'realtime' comes from the computer world, it means any operating system that give processes the ability to interupt the kernel is 'realtime'
Dosen't apply to MCUs.
-
The term 'realtime' comes from the computer world, it means any operating system that give processes the ability to interupt the kernel is 'realtime'
Dosen't apply to MCUs.
Unless you're MCU has an OS :)
-
From the context of the question, i gathered that by 'realtime' he meant: "can i control the MCU externally with my computer via serial/USB/COM port, or every command in the software needs to be hardwired and i can't influence it in any way?"