Show Posts
Pages: 1 2 3 [4] 5 6 ... 8
46  Using Arduino / Programming Questions / Re: modifying SoftPWM for attiny on: February 21, 2012, 03:17:37 pm
I'm using the Aurduino-Tiny 2313 core.

Made a bit of progress... First realised it was still running at 1Mhz. Burnt the 8MHz bootloader to set the fuses and verified correct speed with the standard blink.

Went back to the SoftPWM blink and it was flickering fast now rather than random blinking. I've since discovered that setting a very long delay between the on and off provides correct functionality i.e.

Code:
void loop()
{
  SoftPWMSet(5, 255);
  delay(50000);
  SoftPWMSet(5, 0);
  delay(50000);
}
From this I'm concluding that the timer the SoftPWM is now using is also the one the delay() function uses and that has now been changed such that the delay() function no longer provides a delay in ms. I can live with that and just make adjustments in my code. Are there any other side effects I should be aware of?
47  Using Arduino / Programming Questions / Re: modifying SoftPWM for attiny on: February 21, 2012, 01:27:17 pm
I'm looking to use this on the ATTINY2313 to PWM all the outputs. I created a new "TinySoftPWM.c/h" library and changed the failing references in blind hope thus

Code:
  TIFR = (1 << TOV0);          // clear interrupt flag
  TIMSK = (1 << OCIE0A);       // enable timer0 output compare match interrupt
  TCCR0B = (1 << CS01);         // start timer (ck/8 prescalar)
  TCCR0A = (1 << WGM01);        // CTC mode
  OCR0A = SOFTPWM_OCR;

And also changed ISR(TIMER2_COMPA_vect) to ISR(TIMER0_COMPA_vect).

The code now compiles, but behaves oddly once uploaded (TinyISP). I'm running using the internal 8MHz osc so would expect it to be a bit slower, but I seem to be getting some rather random blinking running the SoftPWM blink sketch.
No idea what to try next....
48  Forum 2005-2010 (read only) / Troubleshooting / Re: Load last project on startup on: March 31, 2010, 09:04:52 am
Thanks for the clarification  smiley
49  Forum 2005-2010 (read only) / Troubleshooting / Load last project on startup on: March 31, 2010, 05:24:27 am
I just updateded from v14 to v18 of the IDE - is there any way to get the last project to load automatically at startup?

New behaviour seems to be always create a new project. When loading the old one, you then get a new window. Annoying.

I couldn't see anything in the preferences to set this, but my last project is listed under last.sketch0.path

Also, is it possible to use tabs as tabs (not spaces)? Setting editor.tabs.expand=false generates nothing at all for the tab key  :-?

Cheers
50  Forum 2005-2010 (read only) / Troubleshooting / Re: Library from Library on: March 31, 2010, 09:49:08 am
Cheers.

Looking into the EEPROM library code, it's basically aliasing some core functions, so it was easier to use those directly  smiley
51  Forum 2005-2010 (read only) / Troubleshooting / Library from Library on: March 31, 2010, 09:04:11 am
I'm creating a small library from which I want to use the EEPROM library but I'm getting a compile error in my library on the include line
#include <EEPROM.h>

error: EEPROM.h: No such file or directory

I can use the EEPROM fine from my sketch with the same include.

Is this behaviour supported, or must all libraries be self contained?

Cheers
52  Forum 2005-2010 (read only) / Troubleshooting / Re: Creating Libraries on: March 31, 2010, 05:19:32 am
I was having the same problem in v14 but moving to v18 it worked as expected!
53  Forum 2005-2010 (read only) / Troubleshooting / Re: What have they used? on: February 04, 2010, 07:38:13 am
They look like audio leads from CD drives - usually a 3 or 4 pin .1" molex on each end....

Not the best by any means, but if you happened to have a boxfull to hand, why not...
54  Forum 2005-2010 (read only) / Development / Re: arduino with internal oscillator on 1Mhz on: December 03, 2009, 04:52:54 am
Quote
Marvin Martian, why do you think you would need to reprogram the bootloader?

Because of what mungbean said earlier:
Quote
As I understand it, clock speed is hard-coded into the bootloader, so changing the crystal isn't enough to change the speed.  You would need to program a new bootloader in as well.

So I'm still confused as to whether this is or is not necessary  :-/

55  Forum 2005-2010 (read only) / Development / Re: arduino with internal oscillator on 1Mhz on: December 02, 2009, 12:17:51 pm
But without the capability to reprogram the bootloader that's going to be a bit awkward. Ho hum.

Cheers
56  Forum 2005-2010 (read only) / Development / Re: arduino with internal oscillator on 1Mhz on: December 02, 2009, 07:54:41 am
I've got a stand alone battery prowered 328 project that runs off 3 AAs - it "works ok" but reading here is sounds like I'm on the edge of it running successfully at 16MHz.

I was considering dropping the crystal down to 8MHz to give me a wider power margin - Comms is not an issue as I'm programming the 328 in an Arduino then taking it out and dropping it in my PCB.

But it sounds like just changing the crystal won't work either and it will require a software tweak too - is that correct?

Cheers
57  Forum 2005-2010 (read only) / Development / Re: Super bright LED array? on: November 26, 2010, 11:27:59 am
You could probably do this with just a few standard ultrabright LEDs withough resorting to the high power route

Something like this will kick out 30 candelas for a few 10's of mA

http://www.rapidonline.com/sku/Electronic-Components/Optoelectronics/5mm-LEDs/5mm-Ultra-high-brightness-15-deg-LEDs/73421/55-2484

Of course you may end up with a directional light source. You don't say how long you need it to last, but you could probably drive a few of these for a day on 3 AAs

If your eyes are accustomed to a dim room these would definitely make you squint
58  Forum 2005-2010 (read only) / Development / Re: Donut shaped PCB in Eagle? on: August 25, 2010, 07:01:21 am
Thanks - I was looking at one of the ultra cheap proto places ( http://iteadstudio.com/store/) but I guess this might be what they mean by "Drills line and long slot can't be accepted"...


59  Forum 2005-2010 (read only) / Development / Donut shaped PCB in Eagle? on: August 23, 2010, 03:06:31 pm
I want to create a donut shaped PCB - circular with a big hole in the middle. Is it just a case of adding circles for the outer and inner dimensions to the dimension layer and the actual board will be defined as the bit between them?

Cheers
60  Forum 2005-2010 (read only) / Development / Re: 4.5v as a power source? on: December 18, 2009, 07:45:06 am
Thanks for the input. I appreciate the circuit can be designed to run at a lower voltage, but this requires additional components/cost/space and also possibly modifying the bootloader for lower crystal frequencies, as the other thread covered...
Pages: 1 2 3 [4] 5 6 ... 8