Programming the ATTINY85 using a pluggable board?

Has anyone used this type of product to program an ATTINY85 chip? I have Digispark development board loaded, but the pluggable board doesn't use the same drivers. I don't see any information on the pluggable USB development boards or drivers for them. Does anyone know how to use these type of development boards with the Arduino IDE. I hoping someone does...

Tnx.

Hi. Did you post the correct link? That link seems to be another thread you started, not a product...

When you find the correct link, please post it using the "link" icon so we don't have to cut & paste it. Like this.

Paul

I did ask you to post that link properly. You ignored my simple and polite request. What is wrong with people on this forum?

I'm sorry, I just missed that in your response. I fixed the link though.

It is not clear how this board works. There is certainly no electronics behind that USB socket so that can only be used for power unless it is designed for the ATtiny to drive the USB.
You might trace out the circuit and see if that can give you a clue. It might be that it is just a board to put the processor in once it has been programmed despite what the words say. Often sources such as that are not always accurate in their descriptions.

I think that is an interesting board.
http://www.ebay.com/itm/Development-Programmer-Board-for-ATtiny13A-ATtiny25-ATtiny45-ATtiny85-/121744326603
You would need to get or make a schematic of the board and then compare it to the schematic of the Digispark to know if it is the same, and if you would treat it the same. I suspect it is a Digispark equivalent based on the parts I see on it, but the description does not say so. You could check with the seller to see if they have detailed instructions or guidance.

wildview:
I have Digispark development board loaded, but the pluggable board doesn't use the same drivers.

I don't know what you mean by this sentence. Does this mean you have a working Digispark?

If this board with the socket is the same schematic as an assembled Digispark, and if you bootloaded an ATtiny85 chip with the Digispark bootloader and inserted it, then the board would be a Digispark. So there's a couple of IFs you need to investigate. As Grumpy_Mike suggests, trace out the board. Perhaps use a multimeter. Compare to a working Digispark. Let us know what you find, I would be interested to hear.

wildview:
Has anyone used this type of product to program an ATTINY85 chip?

I have no experience with that board, so I'm guessing. Take what I say with a grain of salt. This board does not have any components that would "program" an ATtiny85 chip. You would need to put a bootloader on the ATtiny85 using an ISP programmer, then perhaps the ATtiny85 could accept a user program via the USB connector.

More info:
A working Digispark can be made into an ISP programmer by loading LittleWire firmware on it, or an Arduino such as an Uno can be made into an ISP programmer by loading the ArduinoISP sketch.
A Digispark and Adafruit Trinket are the same thing (same schematic), just use different bootloaders and different cores added to the Arduino IDE.

Thanks guys. Yes, I do have a Digispark development board and that appears to work fine. When I plug in the China based board it doesn't recognize the board, but it makes since now because the ATtiny85 chip I have plugged in, is blank and since there's no boot-loader in the chip the USB won't work, so basically it's just a Digispark with a pluggable socket which is fine I guess if you already have chip programmed with the boot-loader code. I think I'll just plug in a Nano board and program the ATtiny with that. btw, the pinouts are identical with the Digispark board, so you are right.

I have a question on the Digispark board that maybe you guys can answer. In the Arduino IDE it says the default board freq 16.5Mhz. If I'm designing some code and want to test it on this board and the code is written to work around an 8Mhz ATTiny85, what is going happen. For example I have the following code I need to use to set a frequency from 1-10000hz, but I can't make it work on the Digispark board. The code is setup to run on an 8mhz ATtiny85 core. Do you guys know why?

#include "UserTimer.h"

#define TIMER_TO_USE_FOR_MILLIS 0

void setup()
{
  // Change timer 0 when millis is on timer 1 and vice versa. 
  UserTimer_SetToPowerup();
  UserTimer_SetWaveformGenerationMode( UserTimer_(Fast_PWM_FF) );
  UserTimer_ClockSelect( UserTimer_(Prescale_Value_1) );
  // Frequency is F_CPU / (1 * (0xFF+1))   // is the point the timer overflows (8 bit value)
  // (8 megahertz) / 256 = 31.25 kilohertz

  setFrequency(2000);   // 2Khz
  on();
}

void loop()
{

}

// Set the frequency (HZ) that we will get on pin OCR1A but don't turn it on
void setFrequency(uint16_t freq)
{
 uint32_t requiredDivisor = (F_CPU/2)/(uint32_t)freq;

 uint16_t prescalerVal = 1;
 uint8_t prescalerBits = 1;
 while ((requiredDivisor + prescalerVal/2)/prescalerVal > 256)
 {
   ++prescalerBits;
   prescalerVal <<= 1;
 }
 
 uint8_t top = ((requiredDivisor + (prescalerVal/2))/prescalerVal) - 1;
 TCCR1 = (1 << CTC1) | prescalerBits;
 GTCCR = 0;
 OCR1C = top;
}

// Turn the frequency on
void on()
{
 TCNT1 = 0;
 TCCR1 |= (1 << COM1A0);   
}

// Turn the frequency off and turn off the IR LED.
// We let the counter continue running, we just turn off the OCR1A pin.
void off()
{
 TCCR1 &= ~(1 << COM1A0);
}

I think the speed of the ATtiny85 is set using a combination of fuses and setting a System Clock Prescaler at run time, which would be done in the bootloader or in the core (I'm not sure where it is done). So the Digispark runs at 16.5 MHz because these settings were made. If you run your project as a Trinket, it would run at 8MHz. That would mean you would load the Trinket bootloader, and load the IDE add-ons from Adafruit, and use the DIP plug board as a Trinket. And/or convert your Digispark to a Trinket by using your Nano as a high voltage programmer.

Nano and Uno are pretty much the same as far as the Instructable goes. They are both ATmega328P boards with a built-in USB interface.

Very cool. I setup an Arudino nano as a programmer via this link and programmed my attiny85 just with the blink program and it worked =) so now I'll do what you said and program my digispark as a Trinket in order to gain access to use the reset pin on the digispark as a digital port and run at 8mhz. This will allow me to have something that works with the same clock speed as the chip it self for development purposes.

btw, does it look like the above code should work ok? I'm just still trying to wrap my mind around the timers on this package. I need to be able to set a PWM freq between 1Hz to 1Khz for a project I'm working on.

Tnx.

wildview:
I don't see any information on the pluggable USB development boards or drivers for them.

And no flipping wonder!

A Digispark without the Digispark. You have to program a chip as a Digispark and then put it into this board to make it into a Digispark.

What on earth would that be useful for? :roll_eyes:

Hi,
I have the same "digispark without digispark" board as mentioned bevor.

I have an attiny85 that I want to make a digipark. According to this link:
https://digistump.com/wiki/digispark/tutorials/programming

In one section I should change the boards.txt-file to set the right fuses and burn the bootloader, but i can't find the directory of the digispark libary.

I installed the libary using a json-file in the boardsmanager. Where do these installed files go?
https://digistump.com/wiki/digispark/tutorials/connecting

I couldn't find the digispark libary to download and put it manually in the hardwarefolder.

So my problem is now that I can't change the boards-file, because i can't find the digispark section.

thank you!

That tutorial at https://digistump.com/wiki/digispark/tutorials/programming is old and was written at the time digispark used a complete IDE download, not an add-on to your existing IDE using Boards Manager. Now that it is outdated, the tutorial is a bit confusing. It would be better if the add-on or if the old IDE just included the complete boards.txt entry.

They probably didn't include the burn bootloader stuff in the boards.txt because in most cases working with a digispark, it won't work because once you turn your ATtiny85 into a digispark you can't use ISP programming and burn the bootloader again. They didn't want people complaining that it doesn't work.

I recommend just downloading the micronucleus bootloader and use an ISP programmer to load it onto the ATtiny85 and set the fuses using the avrdude command line. I describe how to do that in the Instructable that I gave the link to, on Mar 7. The same Instructable goes into pretty good detail the fuse settings including disabling reset, and high voltage programming to recover the ability to do ISP programming again. You can do high voltage programming with an Arduino, a resistor, and a 12V battery.

Thank you, it worked!

Nice tutorial!

Hi guys, I have developed a solution to be used in this kind of development board.
First of all you have to install the Micronuclues Bootloader in order to make your attiny recognizeble by Windows.

The fuctionality is exactly the same as Digispark

If you are interested please to have a look at http://www.hackeduca.com (pt-br) or directly to this post in English (flash-attiny-with-micronucleus/).

Thank you

Edson Sobreira from hackeduca.com

edsonsobreira:
Hi guys, I have developed a solution to be used in this kind of development board.
First of all you have to install the Micronuclues Bootloader in order to make your attiny recognizeble by Windows.

The fuctionality is exactly the same as Digispark

If you are interested please to have a look at http://www.hackeduca.com (pt-br) or directly to this post in English (flash-attiny-with-micronucleus/).

Thank you

Your ATtiny85 pinout is wrong. Pins 5 through 8 are numbered incorrectly.

ty_ger07 is very observant, good catch. Should be numbered like this:

pins.png

At the link I gave in post #7 is how to use an Uno as a high voltage programmer, so setting the fuse to get that extra I/O pin is something easy to do and easy to undo.

fixed, thanks for the hint.

Now can be checked on http://www.hackeduca.com.br/flash-attiny-with-micronucleus/

Burn your Attiny with the same Bootloader used by Digispark. Learn how to use the Pluggable Development Board For ATtiny with Micronucleus Bootloader

Edson Sobreira from hackeduca.com