how to get 0-360 degree binary information from pc
Posted: Sat Jan 21, 2006 3:37 am
i want to get 0-360 degree information from pc via serial port. but i dont know how to get the bytes into pic. this will not be an interrupt but polling. should i send ascii for example 268 degree as ascii2,ascii6,ascii8? or a different way (ie.using 9bits maybe) . using software control how is this accomplished? this will control a dc geared motor with encoder..
and the visual basic program?? how can i write it?
* datasheet tells built in usart can buffer up to 3 bytes..(16f877)
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
Re: how to get 0-360 degree binary information from pc
Posted: Sat Jan 21, 2006 3:44 pm
asunca wrote:
this will not be an interrupt...
Why not?
asunca
Joined: 09 Sep 2005 Posts: 36
Posted: Sun Jan 22, 2006 3:41 am
i dont think interrupt is necessary. i have a 8channel servo controller downloaded from web. i would like to benefit from it in my project because i dont know visual basic. i know how it works (one byte command, one byte data). i need the second byte only. but it is one byte and 0-255 degree can be represented. i want 0-360 and i dont know to get the byte using getc().
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
Posted: Sun Jan 22, 2006 4:15 pm
asunca wrote:
i would like to benefit from it in my project because i dont know visual basic.
i want 0-360 and i dont know to get the byte using getc().
Sounds like there are three separate problems. Unfortunately, I don't know what software are you planning to use; if you post a link, I'll take a look at it. But your software might be sending you 0-360deg as one byte. That way 1 deg corresponds to 0.7083 in the data byte.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum