Jump to content

Fe2o3Fish

Members
  • Content Count

    129
  • Joined

  • Last visited

  • Days Won

    2

Fe2o3Fish last won the day on March 29 2011

Fe2o3Fish had the most liked content!

About Fe2o3Fish

  • Rank
    Level 1

Profile Information

  • Location
    Van Alstyne, TX
  1. Try mine. I modified the original sine wave fader by removing the large table, not using any hairy multiplies or divides. I basically used an x^2 curve as opposed to a sine because it was simple to implement and the curves weren't all that different. Enjoy again! http://forum.43oh.com/topic/475-demo-breathing-led-part-deux/ -Rusty-
  2. What a rush! Sugar rush, that is. :-) Bon appetite!
  3. Yeah, that just about summarizes it.... quite well. :-)
  4. Yup, got mine today in the US Snail as well. Clearly a marketing booklet for engineers who are at the 'dummies' level w.r.t. FRAM. Professional and no cartoons. -Rusty-
  5. Sorry, I don't get on this forum as often as I used to. Still, Doc, yer welcome! Engineering is all about trade offs whether it's software or hardware. Hope yer project works just the way you want!
  6. Yup, ordered on around the first week of August and another about 2-weeks ago. Mouser in Mansfield, TX is 1-day away for US Snail yet I have not seen the book on my doorstep/mailbox. -Rusty-
  7. Doc, The only real problem you might incur is when your 10-ms interrupt goes off while the delayHundredths() function is in the middle of using the delayCounter variable. A cheap fix would be to change delayCounter to be an unsigned int of 16-bits. This would reduce (not eliminate!) the above situation from happening. I mean, do you really need a 4 billion+ 10-millisecond delay? If you want to make available your 4-billion+ 10-millisecond delays, the "expensive" fix would be to have a function that grabs the delayCounter value while turning off that interrupt (or all of them) so the value can't get corrupted. See the file wiring.c down in the Arduino core library source code. Also, it's best not to zero out the delayCounter in a non-interrupt handler as an interrupt can occur while zeros are getting written to that 32-bit value. And it'd be best to just let that counter keep going up and wrapping around (if you leave ELVIS lit up for a long time). As taken from the Arduino world, we'd do something like this: void delayHundredths(unsigned long delay) { unsigned long start; start = millisx10(); // get the value of your delayCounter while (millisx10() - start < delay) { // do nothing (hoping this doesn't get optimized away) } } The way the timing is done here avoids issues when your resulting target time is on the other size of zero from the current counter value (the wraparound issue). What you're doing will work... most of the time. However, when that little interrupt ticks at the wrong time, it's rather hard to say how bad it'll bite ya. It could make the sign act like it's hung up or you might see a time delay be very short or be nonexistent. Yer call. Otherwise, you done well this iteration! -Rusty-
  8. White looks good too (with black lettering, of course).
  9. The delayHundredth() function is probably using the timer interrupt. Highly recommend that you only call spell() from within the while() loop in main(). Let the interrupts set a flag that code inside the while() loop will test for and then call spell(). Calling a function that takes a "long" time to execute inside an interrupt handler is NOT a good idear. -Rusty-
  10. FWIW, IAGARA... Since Aug 10th, I haven't seen my book nor heard from Mouser about it. I reordered today but at least this time I got a page that said "Your order is on its way." Even regular snail mail from Mouser (at least in Mansfield, TX) is only a day away. That is why I order from them. We'll see what happens....
  11. And keep in mind that most (all?) Arduino shields expect and use 5v for signals and power whereas the Launchpad has only 3v3 available and isn't 5v tolerant. -Rusty-
  12. r4k, It appears to be of a dead-tree variety.... which means I can take it and an LED flashlight to the outhouse and read it. :-)
  13. Most misquoted movie -- I prefer the Blazing Saddles clip myself, :-D -Rusty-
  14. For what it's worth, this is what I use without complaints: #include #define interrupt(x) void __attribute__((interrupt (x))) .... interrupt(TIMERA1_VECTOR) Timer_A(void) { /* ISR */ } Naturally, your vector name will vary. :-) This is for msp430-gcc version 4.5.3 on Linux. -Rusty-
  15. Wouldn't mind having this Forth-y thing-y on my FRAM board -- more LEDs, an RTC, accelerometer, and more schtuff to diddle with compared to LP. Have older Launchpads so I had to cobble together a TX-RX reverser but it seems to work OK with my G2553. -Rusty- [Edit: Apparently there is a version for the 5739 FRAM board but trying to access it on the CamelForth website gives me an "Access Forbidden" error.
×
×
  • Create New...