Page 3 of 4

Re: Repost: Martin's PPM tester

Posted: 09 Jun 2021, 16:15
by MaxZ
I can confirm that, I did get the same message ( or similar, I have not compared it word for word) while running a verification. I don't have the Digispark listed as such, I chose the "ATtiny microcontrollers > ATtiny 25/45/85" board.

Cheers,
Max.

Re: Repost: Martin's PPM tester

Posted: 09 Jun 2021, 17:01
by Al Clark
Max,

Did you determine how to resolve the issue?

Re: Repost: Martin's PPM tester

Posted: 09 Jun 2021, 17:47
by MaxZ
No Al, sorry, I did not delve into it. And I doubt if I can, my knowledge in this area is very limited.

Cheers,
Max.

Re: Repost: Martin's PPM tester

Posted: 09 Jun 2021, 17:56
by Al Clark
Max,

I'm in the same boat as you. I've only programmed a few different Arduinos, and I've never written any code. I've just used other's sketches. I've had good success so far, and this is really the first time I've run into a problem loading a program. I'm sure it's something basic I'm overlooking. Hopefully Martin can shed some light on my issue, although I hate to pester him because I know he didn't intend to be providing "builder support" for his PPM meter!

Re: Repost: Martin's PPM tester

Posted: 09 Jun 2021, 18:41
by Martin
The chip in the Digispark is exactly the same chip. The problem is the Digispark bootloader taking up a large part of the chip's available memory.

Do you have a USBasp or other programmer? Most of us that use Digisparks, at least those on this forum, use that method of programming which has many advantages. Programming with a USBasp removes the bootloader and then there's plenty of room. You can easily restore the bootloader later, if you want to go back to programming the Digispark without using the USBasp.

Look in your Arduino IDE Boards Manager... (from the tools/Board menu). You should have attiny by David A. Mellis installed. If not, go to File, Preferences and add this line to your 'Additional Boards Manager URLs'

Code: Select all

https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
Then back to Boards Manager (you may have to reboot the IDE), type attiny into the search box and install the David A. Mellis package. It's currently version 1.0.2 (that hasn't changed for years).

Once you've done that, in the Tools menu, select the following options:
Board: "ATtiny25/45/85"
Processor: "ATtiny85"
Clock: "internal 16MHz"
Programmer: "USBasp"

The sketch should then compile without warning or error. It uses 78% of the program space, and 39% of the dynamic memory.
Connect the Digispark to your USBasp and under the Sketch menu choose Upload Using Programmer.

I think there's a thread here that details the connections from a USBasp to a Digispark. I'll go look for it now and come back and add a link or diagram...

Edit: I can't find the thread, but the connections are:

Code: Select all

USBasp  Digispark (ATtiny85 version)
GND      GND  
VCC      5V
MOSI     P0
MISO     P1
SCK      P2
RES      P5

Re: Repost: Martin's PPM tester

Posted: 09 Jun 2021, 19:04
by MaxZ
Setting the Arduino IDE with those parameters did make the error message disappear when running the verification, I must have done something wrong before. Sorry Al/Martin... :oops:

Cheers,
Max.

Re: Repost: Martin's PPM tester

Posted: 09 Jun 2021, 21:02
by Al Clark
Martin,

Thanks very much for all the info! Yes I do have a USBTiny AVR ISP programmer and that is what I have been using in the past on my other larger Arduino boards. I will program that way and that should solve my problem. Thanks for the pinouts - that is what I didn't have for the Digispark. I'll let you know how it goes.

Re: Repost: Martin's PPM tester

Posted: 09 Jun 2021, 21:49
by Al Clark
Martin,

The sketch uploaded just fine with your instructions, using my USBTiny ISP Programmer. Thank you so very much for the education and help! I am (hopefully) a little smarter now when it comes to programming the Digispark. Now I can go ahead and put together your PPM meter.

Re: Repost: Martin's PPM tester

Posted: 09 Jun 2021, 21:55
by Al Clark
Max,

Glad you got your program to work also!

PPM Meter Finished

Posted: 12 Jun 2021, 03:00
by Al Clark
Martin,

I'm quite pleased with my PPM Meter. It seems to be working exactly as expected. Without your help and information I never would have finished it, so thanks very much! My 150 mah LiPo battery was too big to fit into your case, so I drew up a modified version using DesignSpark, the only 3D CAD I know how to use. My case is narrower (to fit my display) and deeper.

Where in the circuit did you put your switch? I decided to put my switch in the + battery lead, thinking that it is good to get the power off the battery management board when not in use. However, this means to charge the battery, the switch must be on, and I'm wondering if that will cause any issues with the Digispark and display.