Problem with communication between BS2px and SX28
real_polyfimos
Posts: 12
Hallo, to all of·you.
I would be very thankful to anyone who could help me make a sx28 chip communicate with a BS2 stamp. I know·that this is silly for a lot of guys in these forums, but I am not experienced in assebly programming.
First of all,· I'm·writing my thesis this time and because I love the BS2 family chips, I decided to·use a BS2px processor along with a BoEBot style robot to path plan it.
Well, I have tried one million ways to tune the wheels to achieve·aqual speed·(including the PWMPAL, a custom LM556 driver and off course the classic PULSOUT - all these methods where failed because when I look the signals in the oscilloscope, I do not have the resolution I want to tune the wheels)
I had also bought the SX programming kit and for my last hope, I tried to program the SX28 chip, and I was surprised with the results. But unfortunately, even though I have managed to tune the wheels with plenty of accuracy - I couldn't believe it, I need to use it as a slave (only as a motor controller) device to the master BS2px. I have searched very hard these days this forum, but as I told before, I am not experienced in assebly. So,· I would appreciate if· someone could help me with this project.
I need to transfer a byte from the BS2px and then the SX28 run the motors. I have only 5 cases of movements. 0-servos stay still, 1-move forward full speed, 2-move backwards full speed, 3-spin·right half speed, and 4-spin left half speed.
So, the byte will take a value·0 - 4 and then the corresponding code will handle the motors. The SX PULSOUT has given very good results to the oscilloscope , but I need to find some way to get out of the DO - LOOP, and this is my problem. And of course a way to transmit the byte from one side to another.
Well, any who wants to help is welcomed, thank you in advance.
I would be very thankful to anyone who could help me make a sx28 chip communicate with a BS2 stamp. I know·that this is silly for a lot of guys in these forums, but I am not experienced in assebly programming.
First of all,· I'm·writing my thesis this time and because I love the BS2 family chips, I decided to·use a BS2px processor along with a BoEBot style robot to path plan it.
Well, I have tried one million ways to tune the wheels to achieve·aqual speed·(including the PWMPAL, a custom LM556 driver and off course the classic PULSOUT - all these methods where failed because when I look the signals in the oscilloscope, I do not have the resolution I want to tune the wheels)
I had also bought the SX programming kit and for my last hope, I tried to program the SX28 chip, and I was surprised with the results. But unfortunately, even though I have managed to tune the wheels with plenty of accuracy - I couldn't believe it, I need to use it as a slave (only as a motor controller) device to the master BS2px. I have searched very hard these days this forum, but as I told before, I am not experienced in assebly. So,· I would appreciate if· someone could help me with this project.
I need to transfer a byte from the BS2px and then the SX28 run the motors. I have only 5 cases of movements. 0-servos stay still, 1-move forward full speed, 2-move backwards full speed, 3-spin·right half speed, and 4-spin left half speed.
So, the byte will take a value·0 - 4 and then the corresponding code will handle the motors. The SX PULSOUT has given very good results to the oscilloscope , but I need to find some way to get out of the DO - LOOP, and this is my problem. And of course a way to transmit the byte from one side to another.
Well, any who wants to help is welcomed, thank you in advance.
Comments
For *any* serial commands, or accurate PULSIN/PULSOUT type commands, you *must* use a resonator, crystal or TTL clock with the SX. The internal 4mhz oscillator is not accurate enough for reliable serial communication.
For your do/loop issue, you will not hae an easy to "break out" without using serial routines in an Interrupt Service Routine (ISR), so that the serial input/output happens invisibly in the background.
If you have pins to spare, you could use another pin on the Stamp and the SX for a pseudo busy/flow-control signal (i.e., the slave could manually poll the pin and if it changes state, then you could break out of the loop, etc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
create bitmap data tool: 1uffakind.com/robots/povBitMapBuilder.php
resistor ladder tool: 1uffakind.com/robots/resistorLadder.php
convert images to ascii art: 1uffakind.com/apptoys/convtoascii/
Parallax, Inc. · Page 177 :SX-Key/Blitz Development System Manual 2.0 ?
Thank you in advance.
However, I don't see any debounce in your buttons?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
create bitmap data tool: 1uffakind.com/robots/povBitMapBuilder.php
resistor ladder tool: 1uffakind.com/robots/resistorLadder.php
convert images to ascii art: 1uffakind.com/apptoys/convtoascii/
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
create bitmap data tool: 1uffakind.com/robots/povBitMapBuilder.php
resistor ladder tool: 1uffakind.com/robots/resistorLadder.php
convert images to ascii art: 1uffakind.com/apptoys/convtoascii/