That is one of the best advertisements for the Propleller I have ever seen. Very cool. The Prop is a perfect fit there.
I hope he follows that up with the video display of the measurements.
Don't get me wrong, he did it nicely in assembler.
For me, that would be a stretch right now. I 'm more of a hardware guy.
That bit string also could be captured with a 32 bit hardware shift register.
There are 40 clock pulses corresponding to 40 data bits. The first 8 have no value, presumably.
After the 3mS data string is captured the data could be shifted into the prop at a slower rate.
The shift pin on the shift register is ORed with the clock from the AtoD an the Prop.
There should be enough time to do this, and other things, in 130mS at 7.5 samples/S and do it in spin.
If that's to fast one could read every other sample.
(Woo, Roy Eltham commented on a similar technique in software. I should have read thoes comments before this posting. Like minds huh.)
BTW, this device looks fairly easy to work with, their not always this simple.
I would make the prop a SPI master and make my own readings in-between the C51 does its, as there is plenty of time.
Just wait wait for CS to go high and then turn that Prop pin around and pull CS low to start my own SPI sequence.
I would make the prop a SPI master and make my own readings in-between the C51 does its, as there is plenty of time.
Just wait wait for CS to go high and then turn that Prop pin around and pull CS low to start my own SPI sequence.
Nice idea!
That ADC is attractive but costly. Seems like it was over-spec'd.
I can't believe they used a 24 bit A/D. Do they really expect to weigh anything to one part in 16 million or so with that device?
Could there be enough bottom end noise that they throw out the lower 8 bits and scale the middle 16? Not so much for accuracy but because of a cheaper/noisier sensor? (totally guessing if it's not obvious!)
I should add, too, that this is something of an advertisement for Spin/PASM as well. He seemed quite content to stay with that combination while tackling the problem at hand.
He had a prerequisite that he wanted to not "destroy" the scale in the process. So it could still work on it's own.
I chatted with him today about code, and he hoped that most of what the overall project needs could be done with Spin and only a little PASM (since he wasn't very strong in PASM). I mentioned propgcc (which he wasn't aware of until I mentioned it) and he thought that was a cool option, but asked about mixing that with pasm and spin (which I explain a bit about).
We'll see what he decides on in the next video I guess.
I can't believe they used a 24 bit A/D. Do they really expect to weigh anything to one part in 16 million or so with that device?
First, he mentions that the scale reads to mili-grams, so it's rather precise. Second a 24-bit ADC like what's used in the scale can be connected directly to a strain-gauge bridge and still give good resolution. Direct connection avoids the cost, electrical noise, and drift of using an external amplifier.
Interesting that the board looks hand-soldered. This scale must be a pretty low volume item.
>Interesting that the board looks hand-soldered. This scale must be a pretty low volume item.
I often see that in Chines items, they often don't do a complete redesign when it comes to adding some new smt/modern ICs.
I guess they don't want to mess with what worked in 80' and labor cost is still low to have stuff handsolderd.
Comments
I hope he follows that up with the video display of the measurements.
Don't get me wrong, he did it nicely in assembler.
For me, that would be a stretch right now. I 'm more of a hardware guy.
That bit string also could be captured with a 32 bit hardware shift register.
There are 40 clock pulses corresponding to 40 data bits. The first 8 have no value, presumably.
After the 3mS data string is captured the data could be shifted into the prop at a slower rate.
The shift pin on the shift register is ORed with the clock from the AtoD an the Prop.
There should be enough time to do this, and other things, in 130mS at 7.5 samples/S and do it in spin.
If that's to fast one could read every other sample.
(Woo, Roy Eltham commented on a similar technique in software. I should have read thoes comments before this posting. Like minds huh.)
BTW, this device looks fairly easy to work with, their not always this simple.
Duane J
http://www.mouser.com/ProductDetail/Cirrus-Logic/CS5530-ISZ/?qs=sGAEpiMZZMuYaq4aOfOV%252bAj8IxaLNHFA
I would make the prop a SPI master and make my own readings in-between the C51 does its, as there is plenty of time.
Just wait wait for CS to go high and then turn that Prop pin around and pull CS low to start my own SPI sequence.
That ADC is attractive but costly. Seems like it was over-spec'd.
Wow, I can't believe how ugly that assembled PCB is.
Could there be enough bottom end noise that they throw out the lower 8 bits and scale the middle 16? Not so much for accuracy but because of a cheaper/noisier sensor? (totally guessing if it's not obvious!)
I chatted with him today about code, and he hoped that most of what the overall project needs could be done with Spin and only a little PASM (since he wasn't very strong in PASM). I mentioned propgcc (which he wasn't aware of until I mentioned it) and he thought that was a cool option, but asked about mixing that with pasm and spin (which I explain a bit about).
We'll see what he decides on in the next video I guess.
Roy
First, he mentions that the scale reads to mili-grams, so it's rather precise. Second a 24-bit ADC like what's used in the scale can be connected directly to a strain-gauge bridge and still give good resolution. Direct connection avoids the cost, electrical noise, and drift of using an external amplifier.
Interesting that the board looks hand-soldered. This scale must be a pretty low volume item.
Lawson
I often see that in Chines items, they often don't do a complete redesign when it comes to adding some new smt/modern ICs.
I guess they don't want to mess with what worked in 80' and labor cost is still low to have stuff handsolderd.