mardi 2 octobre 2012

Code conversion

Since the BS2px is faster than a simple BS2, all the time sensitive commands need to be converted.
I modified each program that achieve a basic task :
  • Servo control
  • Ping))) distance measure
  • Serial communication
  • Voltage control
The last one was actually the tricky one. Maybe I should say that it IS the tricky one because the calibration is wrong now, and I don't understand why... The data collection is done with a SHIFTIN command, which is not time sensitive (synchronous). I tried to slow down the execution with PAUSE 10 instrutions, with no success. I even touched the potentiometer that is at the input of the ADC0831 with no effect on the result in the Debug Terminal.
What if the ADC had been damaged by the old BS2 ? Well, thanks to ebay, a new ADC should be in the mail soon...
Besides that, all the bricks are available to program complex behaviors with the new microcontroller.

Aucun commentaire:

Enregistrer un commentaire