SX48 Timers question
LoopyByteloose
Posts: 12,537
This may seem a bit idiotic, but Gunther's book never goes into the SX48 and SX52. I have several of each.
Are the hardware timers in parallel with the processor operation? And if so, how do you monitor the results?
In some cases, like PWM generation, it would seem there is no need to monitor. But in others, like maybe a second longer form of ISR, it appears one must do so.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?
aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
Are the hardware timers in parallel with the processor operation? And if so, how do you monitor the results?
In some cases, like PWM generation, it would seem there is no need to monitor. But in others, like maybe a second longer form of ISR, it appears one must do so.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?
aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
Comments
I just bought 10 of the SX48 boards, and was starting to think about using one for something I've needed for several projects lately - a propeller RAM accessory board that uses as few pins as an SD card, can write to RAM faster than an SD card, like a long per microsecond or faster, and has a capacity of well into the tens of megabytes. I'm thinking that an SX48 card driving a surplus 30 or 72 pin SIMM DRAM may be able to do this.
So I also started looking at the SX48 timers to see if they'd be useful for fast serial clocking of 32 bit longs.
The Parallax SX48BD manual chapter on them looks pretty good, but as with anything like this, some actual examples would be really helpful.
Okay, here is a project concept to consider.
I have a Parallax Toddler that used to have a BasicStamp2 running it, but at some point all the added gizmos are too much for the PWM to the motors. With an SX48, it would appear that I have to 16bit PWM generators available that would free up processing to do other tasks. And of course, I have more program memory as well.
I see that SX/B is finally coming out with Version 2.0, so I might try that. I happened to already drill a couple of holes in an SX52 Proto Board and mount it ion the Toddler. Originally I was considering having a BasicStamp drive the motion and the SX52 driving everything else. But this seems far more elegant as PWM would hold position between command changes without two processors.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?
aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
http://forums.parallax.com/forums/default.aspx?f=7&m=357764&g=358805#m358805
When using the timers I had to mask off the interrupts so that the timers won't generate any in PWM mode. Otherwise it was messing up the ISR based Serial code.
Robert
The SX48 documentation is a bit rough going to understand. I've been over it many times and it certainly seemed to be possible that it would mess with ISRs.
In fact, it does look like one of the Timers could be used as an alternate ISR timer if you had more than 255 words of code to work through. But I don't quite know why one would bother. And of course, having two different timer interrupt intervals makes everything indeterminate - the opposite of why the ISR is so useful.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?
aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
Post Edited (Loopy Byteloose) : 8/3/2010 8:47:14 AM GMT
Robert
George,
please check pages 237 ff in my book for a description of the SX 48/52 timers. You will also find more information about the SX 48/52 in other chapters of my book. The TOC should direct you to the right spots .
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
But what I really meant was you don't provide any code examples of actual use. I apologize for presenting an untruth.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?
aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan