|
Page 1 of 1
|
[ 8 posts ] |
|
Writing Outputs of Hitechnic Prototype board
| Author |
Message |
|
JohnPeabody
Rookie
Joined: Sun Sep 21, 2008 10:34 am Posts: 4
|
 Writing Outputs of Hitechnic Prototype board
I am having trouble writing the digital outputs of my prototype board. I downloaded the driver from http://www.breigh.com/xander/HTPB-driver-0_3.c and this works for reading the A/D and the digital I/O, but I can not command the Digital I/O when it is set for outputs. I am using the main routine within the driver to test the board and the circuit shown here: http://mightor.wordpress.com/2008/08/20 ... rd-driver/. I have the resisters between the board and the LEDs. Any ideas would be appreciated.
|
| Wed Dec 31, 2008 11:55 am |
|
 |
|
chadgeorge
Novice
Joined: Fri Oct 24, 2008 8:58 am Posts: 87
|
 Re: Writing Outputs of Hitechnic Prototype board
John, Sorry for the late reply. I just got around to programming the prototype board myself. One thing I noticed about Xander's driver is that I always get an I2C error on the first few I2C calls. It don't see anything wrong in the driver so its probably in the firmware...or just unavoidable in general. I found that it is good to try to read from the device a few times before making the first write operation. Very likely, your write operation for setting the IO directions isn't going through (you'd need a logic analyzer or scope to know for sure). I got the same results as you initially. Doing dummy read ops fixed the problem for me. I've now tested digital inputs, outputs and reading analog...everything about this driver seems to work for me. Also on his blog Xander has done some speed testing and has posted a 0.4 version that includes reading all ADC simultaneously. http://mightor.wordpress.com/-Chad
|
| Tue Feb 10, 2009 6:12 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2864 Location: Rotterdam, The Netherlands
|
 Re: Writing Outputs of Hitechnic Prototype board
Hi there,
I didn't notice this thread earlier, sorry about that. The first 2-3 calls will always give an error. I get them even when I am just using straight I2C calls, although I am not sure why that is. I've reported it to the RobotC developers a while back but I guess they have other fish to fry.
What problems are you experiencing?
Regards, Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Wed Feb 11, 2009 12:15 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2864 Location: Rotterdam, The Netherlands
|
 Re: Writing Outputs of Hitechnic Prototype board
Mods: can this be moved to 3rd party sensors?
Thanks
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Wed Feb 11, 2009 12:43 pm |
|
 |
|
Jeff McBride
Professor
Joined: Fri Sep 19, 2008 1:22 am Posts: 200
|
 Re: Writing Outputs of Hitechnic Prototype board
Note: This is here because the prototype board is legal in the FTC competition and this is where teams are likely to look for these kinds of answers.
_________________ Jeff McBride Benson Robotics Club
|
| Wed Feb 11, 2009 6:02 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2864 Location: Rotterdam, The Netherlands
|
 Re: Writing Outputs of Hitechnic Prototype board
Yeah, I realise that but I don't really read this forum  Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Wed Feb 11, 2009 6:06 pm |
|
 |
|
chadgeorge
Novice
Joined: Fri Oct 24, 2008 8:58 am Posts: 87
|
 Re: Writing Outputs of Hitechnic Prototype board
Xander, Thanks for the driver. I was half way through writing one when I found yours...doing research for mine  Saved me a few hours at least. I wish it was included in the RobotC release (although you might not have written it yet) and it should definitely be included on Hitechnic's site since they don't have any RobotC examples.
|
| Fri Feb 13, 2009 9:53 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2864 Location: Rotterdam, The Netherlands
|
 Re: Writing Outputs of Hitechnic Prototype board
Hiya Chadgeorge, I am glad it is doing the job for you! As for having it included on the HT website, a contact of mine there has told me that they have every intention of putting the driver for the HTPB accessible through their website. I host all my drivers here: http://code.google.com/p/robotc-drivers/ . I just noticed that my HTPB driver is not on this page. I will be sure to add it later. The documentation part isn't done yet except for the HT IR Link sensor. Regards, Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Sat Feb 14, 2009 3:12 am |
|
|
|
Page 1 of 1
|
[ 8 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 3 guests |
|
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
|
|