BasicMicro - Forums

www.basicmicro.com
It is currently Mon May 21, 2012 8:33 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: strange results with my board
PostPosted: Wed May 18, 2011 9:13 pm 
Offline
Citizen

Joined: Fri Apr 22, 2011 7:29 pm
Posts: 9
ok i have been working on a robot. im using a ping sensor and a serial motordriver with a atom pro 24. since i got the bugs worked out with the motordriver and it works, i now can not get mi ping sensor to work. the code came from a post on here and it worked for 3 days then on friday of last week it stopped working. i havent changed a thing and it just wont either recieve the pulsout or idk what. now when i download the code for the ping after working on the motordriver, the ping wont work and my motordriver stays active??? could someone please give me a helpfull himt or an idea whats going on. im also using a atom pro-development board revB if that makes a diffrence. here is the code for the sensor and my motordriver.

ping:
pingrange var long
pingraw var long
ping con p10

low ping
high ping
pulsin ping, 0, pingRaw 'read the ping
low ping
pingRange = pingRaw / 148 'convert to inches
serout s_out, i9600, ["distance", sdec pingrange, 10,13]

motordriver:
motordriver con p14
reset con p15

high motordriver 'take serial high
low reset 'reset motor controler
high reset' bring active high reset up
pause 100' motor controller setup time

;forward:
serout motordriver,i9600, [$80, 0, 4, 65] ;run the motor at full power
serout motordriver,i9600, [$80, 0, 6, 65] ;run the motor at full power


Top
 Profile  
 
 Post subject: Re: strange results with my board
PostPosted: Thu May 19, 2011 9:43 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
Limit your code to just the ping and look at the sensor output on a scope. I know alot of people don't have scopes but thats really the only way to confirm if there is a problem with the sensor, which is the most likely case when code hasn't been changed but something stops working.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: strange results with my board
PostPosted: Thu May 19, 2011 10:22 am 
Offline
Citizen

Joined: Fri Apr 22, 2011 7:29 pm
Posts: 9
yeah thats what i did my code parts are seprate and when i load ping code after playing with the motordriver the motordriver stays active like the code didnot clear and i plan on scoping the sensor tonight. but also when i pulse the ping with a low high low command and have my dmm on the ping jumper and ground i dont get a voltage pulse so idk theres not much more i can figure out about why the motordriver stays active if i close out the driver code in studio and open ping code and load it .


Top
 Profile  
 
 Post subject: Re: strange results with my board
PostPosted: Fri May 20, 2011 10:38 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
If the motodriver is an intelligent one it may just be continuing to run the last command sent?

DMM may not see the very short pulse sent to the Ping sensor. Obviously you can try increasing the pulse time to make sure the I/I on the board is still working.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO