Author Topic: Reeciving Inputs from Laptop while MCU Program is running  (Read 1286 times)

0 Members and 1 Guest are viewing this topic.

Offline motobecaneTopic starter

  • Beginner
  • *
  • Posts: 5
  • Helpful? 0
Reeciving Inputs from Laptop while MCU Program is running
« on: March 04, 2010, 08:51:50 PM »
I have an Axon controlling some stepper motors.  Is there a technique/software package for having the MCU accept input from the laptop about motor speed and direction?  I know how to bootload from my laptop to my MCU and how to use Hyper-Terminal to receive data from the Axon, but I'm looking for something more dynamic.

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: Reeciving Inputs from Laptop while MCU Program is running
« Reply #1 on: March 04, 2010, 09:05:27 PM »
Use a better terminal program like RealTerm so that you can also send serial data to the Axon and not just receive.

Offline hopslink

  • Robot Overlord
  • ****
  • Posts: 202
  • Helpful? 14
Re: Reeciving Inputs from Laptop while MCU Program is running
« Reply #2 on: March 05, 2010, 03:07:50 AM »
Hyperterminal sends any character you type into the main window so you don't need RealTerm (but RealTerm is by far the better tool - recommended). It can also send files.

The problem is that you can't see what you have typed/sent by default. If you go into the properties for your connection, under the Setup tab, ASCII settings, you can set a checkbox to echo typed characters locally, now what you type/send will show on the screen.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: Reeciving Inputs from Laptop while MCU Program is running
« Reply #3 on: March 05, 2010, 08:16:50 AM »
I think the OP is asking about how to have the Axon receive and respond to commands send from the laptop to the Axon while the Axon is busy timing signals to the stepper motors.

This should be able to be done by writing (or using library functions if they exist) an interrupt driven UART receiver. Basically, when the Axon's UART receives a character an interrupt is issued and code execution jumps to the ISR (Interrupt Service Routine) which reads the character from the UART and passes the character on to a parsing routine to be interpreted (say 'stop motors').



 


Get Your Ad Here

data_list