Show Posts
Pages: 1 ... 7 8 [9]
121  Forum 2005-2010 (read only) / News / Re: The ButtonShield, a 34 button mini-keyboard shield on: June 13, 2009, 01:06:03 pm
@inthebitz -- Thanks for the reply!  So since its an AVR 645 it sounds like if I had a really simple application (or maybe just some more advanced button-combination logic) I might be able to run it on the button shield directly...

Also are the buttons surface mounted?  If so, could you briefly describe how you managed to surface mount onto both sides in the toaster oven.  Most sites on the web that I've read tell you NOT to DIY double sided surface mounting.

122  Forum 2005-2010 (read only) / News / Re: The ButtonShield, a 34 button mini-keyboard shield on: June 11, 2009, 10:01:18 pm
What is the chip on the back that does all the work anyway?  Is it another ATMEGA?
123  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Assembly or GCC? on: April 30, 2010, 09:32:22 pm
you can even write assembly in Arduino/GCC:

for example a very tiny delay that will NOT be optimized away:

void verysmalldelay(unsigned char loop)
{
  for(unsigned char i=0;i<loop;i++)
    {
    asm("nop");
    }
}
124  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: RGB LED issues on: May 01, 2010, 05:31:07 pm
PrevR G B are not being set to the current color in this new one... but I'm not sure why that would cause the fade to stop.  Can you blink pin 13 LED in crossfade, and have it go solid between crossfades() to determine whether the sketch freezes or if it keeps going but is just not having an effect on the RGB led?

125  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: RGB LED issues on: April 30, 2010, 10:15:08 pm
Your array of 3 colors seems fine to me... your mod is not fine.

It would be nice if you explained what's going wrong!

But here is something:

int calculateStep(int prevValue, int endValue) {
 int step = endValue - prevValue; // What's the overall gap?
 if (step) {                      // If its non-zero,
   step = 1020/step;              //   divide by 1020
 }
 return step;
}

By doing an integral division step will be rounded down and the result is you will not get to your color.
To get there either convert it all to float so the fractions are not lost (or at least less is lost).  Or to do it perfectly, and very quickly in integers use the fundamental insight in Bresenham's line drawing algorithm (google it).  

Basically, for just one color:
1. Start a counter.
2. for each iteration, add (end-start) to the counter.
3. If the counter goes below 0 or above 1020 (i.e. the # steps), ADD or SUBTRACT 1020 respectively, and tick your color down/up by 1.  

Why it works:
Adding end-start to a counter and then comparing it to 1020 is just like doing (i % step ==0)
Except that when you hit the condition, the remainder is preserved since you add/subtract.
This remainder is a cumulative error that will eventually advance your color just a little sooner than if it did not exist.

Think of it as division deconstructed :-).  Way back in 2nd grade when you learned what division really WAS this is what they did.


This is an extremely powerful algorithm for embedded programming where floating point is too expensive; its generally applicable any time you want to move X times in Y steps.

126  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Looking for someone to build a prototype on: April 30, 2010, 09:23:35 pm
Help us self-select... Hardware? software? Both?  

Most importantly do you feel this proto is a month of 8 hours a day work or a night-and-weekends thing for arduino experts?
127  Forum 2005-2010 (read only) / Bar Sport / Re: Cutting PCB boards on: April 26, 2010, 09:11:26 pm
The jig saw or scroll saw is reciprocal action which isn't all that clean for cutting PCBs because the recovery tends to lift the PCB up and therefore jostle it around a bit.  Of course, there's a little fork that holds it down, but it might scratch your pads, and cannot be used if there are chips on your boards.  

A band saw is quite nice since it it always pushing the PCB into the cutting surface.  They are MUCH more powerful than a scroll saw so the cut goes faster.  Also they often have clamping surfaces for guides and so forth which is also nice.  So I'd go with a band saw (I have both for woodworking and have used both for PCBs).  

However they make a nasty screech going thru PCB (at least mine does!), they are a bit more dangerous than a scroll saw (just a little less dangerous than a table saw I'd say), and of course while changing the blade happens much less frequently than a scroll saw, it is more expensive.
128  Forum 2005-2010 (read only) / Bar Sport / Re: "Easy" to use clock chip? on: June 24, 2009, 05:11:30 pm
Thanks!  It looks like that chip has 14 bits of frequency selection; it would be pretty cool to connect to the arduino & a pot to make an adjustable clock.
129  Forum 2005-2010 (read only) / Bar Sport / Re: "Easy" to use clock chip? on: June 19, 2009, 10:32:27 am
@Grumpy_Mike I'm really just fooling around, so all I need is "much faster than the Arduino"; so perhaps I don't need a non-integral relationship.

@Mike Mc
That question really deserves its own posting in the forum so other people can chime in.  But let me summarize here and maybe repost later...

In terms of uses, it seems like one CPLD can take the place of some of the logic portion of some special purpose chips that people are using.  Here are my ideas:

1. 5 to 3 volt converter (I thought to use a 5V tolerant CPLD)
2. IO multiplexer/demultiplexer  (of course, the new MEGA on the 1280 has a lot of IOs...)
3. Interrupt multiplexer

Then there is basic logic that can be implemented in the CPLD.  This logic could also be implemented in the AVR of course, but some of them are more efficiently done in a non-Von Neumann hardware architecture.

4 Button state sensing debouncing
5 Simple logic around other sensors (IR for example), like filtering false signal.
5 Stepper motor control (LOTS of motors)
6. USB to serial (may not fit)

Then there is some stuff that would benefit from a high clock rate:
7. PWM outputs
8. therefore LED drivers (but not power LEDs)
9. LED matrix controllers > 8x8
10. Video signal driver (I haven't really looked into it; but without a DAC this might not really work -- could you use PWM and an inductor to smooth out the signal?)

Also, I think that it would be great for educational purposes; the combination of Arduino + CPLD is a simple model for a modern CPU + chipset.

But the most important reason is because it will be fun! :-)


130  Forum 2005-2010 (read only) / Bar Sport / "Easy" to use clock chip? on: June 17, 2009, 05:47:37 pm
This isn't really Arduino related, but I thought I'd post here because all the guys on the Arduino forum seem to put an emphasis on ease of use (and it IS for a shield)... but I'm wondering whether there is an easy to use PLL clock chip.  Surface mount is ok.  400Mhz and maybe some outputs that are less (or selectable)...  I've been looking at a cypress part CY22394FXC, but you have to program it and it seems like doing so is so complicated that Cypress had to write a special piece of programmer software to help you out!


Thanks!
131  Forum 2005-2010 (read only) / Bar Sport / How do you mail cheap electronics cheaply? on: June 11, 2009, 08:36:44 am
These Arduinos and shields etc are around $20-$50.  But we are an international community!  UPS wants $60 for 1lb, FedEx even more.  How can I cheaply mail stuff around and preferably with some sort of tracking or proof of delivery?  What methods do you use?
132  Forum 2005-2010 (read only) / Bar Sport / Re: Tip: Picture hosting for Arduino Forums on: June 06, 2009, 09:13:16 am
I think that the URL that you put in MUST end in a valid photo extension.  For example

http://blah//foo.jpg

NOT:

http://blah/foo

This little issue bollixed me for quite some time with Google picasa.

133  Forum 2005-2010 (read only) / Uno Punto Zero / Re: Removable bootloader delay on: April 14, 2010, 09:32:11 am
leofs PMed me about my toastedBoot bootloader http://code.google.com/p/toastedboot/ which is basically adaboot++.  I mostly put it up on google code because there was no other home for modded bootloaders -- they were just zip files on people's web sites, which made it hard to find the "latest".  

One adaboot feature is that it goes direct to the sketch on powerup and only waits listening to the serial on reset.  That seemed to satisfy him which may be why we haven't heard anything more.

BTW, features I added to adaboot are:

1.  if you double click the reset button, it waits a LOOONG time for a serial.  This is very useful when your board is far away from the computer and you don't have the auto-reset feature (i.e. using a FTDI cable).  Originally, I had it set up the opposite -- it would wait a long time by default, a double click would drop direct to the sketch.  Unfortunately, the auto-reset feature of the standard Arduino actually resets the board more than once so I swapped it so toastedBoot would work on boards that support autoreset.  But if you are using a clone you may prefer this other double-click behavior.

2.  The pin 13 led fades in and out while the board is waiting for a sketch.  This way you know it hasn't hung somewhere.

3.  Code crunching -- I reworked the code a lot to make it smaller so that new features could be added in the same flash space.



On a slightly different topic:  

I think that it would be possible to write a sketch that updated the bootloader.  I mean why not?  Its just writing to flash.  The problem with this idea is that if the sketch was interrupted mid-write your board would be bricked -- you'd have to buy a $20 ICSP to recover it.  So maybe its not worth the support calls it would generate.  What do you think?

Pages: 1 ... 7 8 [9]