Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

realtime control problem

Status
Not open for further replies.

Jawn

Newbie level 2
Joined
Feb 7, 2006
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,299
I'm using an Atmel AVR series microcontroller to position a motor using feedback from a rotary encoder. The code uses avrgcc libs.

The problem is this:

When I was developing the control algorithm I put code in it that printed out variable values to a serial port so I could get feedback if the code was working as expected. When I remove the code that prints to the serial port, the code doesn't work perfectly anymore and has issues.

I can leave the printing statements in the code but that would waste space and result in an unelegant solution. So how can I go about getting feedback on time sensitive code without disturbing the code itself?

Thanks in advance,

John
 

cfant

Full Member level 3
Joined
Apr 4, 2001
Messages
188
Helped
25
Reputation
50
Reaction score
6
Trophy points
1,298
Location
California, USA
Activity points
1,151
You can use leds to show you are in your code. I suspect that you have timing issues with your code. You should revisit your code.
 

nebisman

Full Member level 4
Joined
Apr 13, 2002
Messages
226
Helped
10
Reputation
22
Reaction score
9
Trophy points
1,298
Activity points
1,849
Send yoour code I guess is an timer or interrupt problem

LB
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top