Go Down

Topic: ATtiny 2313  (Read 2231 times) previous topic - next topic

be80be

Didn't no where to put this been playing with ATtiny 2313.
Ok all is good i load a simple blink the rate of blink is way to slow i set for 1 mhz clock and it blinks fine set it to 8 mhz and its blinking once every 8 seconds.
I'm using the arduino as ISP for programmer

marco_c

What is the clock speed of the processor? You need to match the selection in the IDE to what you have set the processor to otherwise it will keep running at the same speed and the software thinks it is faster.

be80be

Well I guess it's set to 1 mhz because that matches the blink. I guess I left out what I want to no LOL
I want to figure how to get the clock set to 8Mhz guess I need a better programmer or is there a way to set the  fuse to 8 mHZ with the arduino as ISP.

OldSteve

#3
Aug 07, 2016, 05:58 am Last Edit: Aug 07, 2016, 06:01 am by OldSteve
I assume you're using the internal oscillator and not an external crystal or resonator.

Setting the clock in "Tools" should set the fuses up correctly. Before uploading a sketch, are you doing the ">Tools >Burn Bootloader" step to set the fuses?

I use a USBASP programmer, but Arduino as ISP should be fine and do the same job.
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

dmjlambert

Have a look at the data sheet for the ATtiny2313.   I think online fuse calculators are very nice to work with to figure out that stuff.   When you look at the data sheet for the processor, and the fuse calculator, you are armed with great info.  
http://eleccelerator.com/fusecalc/fusecalc.php?chip=attiny2313&LOW=62&HIGH=DF&EXTENDED=FF&LOCKBIT=FF
What you're looking for is to unprogram (set to 1) the divide by 8 bit (CKDIV8).
Compare the info you gather with the boards.txt entry you are using in the IDE.   The burn bootloader function of the IDE uses the boards.txt entry to set the fuses, or you can set the fuses manually with the avrdude command line and the Arduino as ISP connected.   

be80be

I tried that all I get is a atting 2313 set for 1 mhz  I loaded a blinky no problem

Just got figue how to change it to 8 mhz
Burn bootloader gives this
Quote
avrdude: ser_open(): can't set com-state for "\\.\COM10"
Error while burning bootloader.

be80be

#6
Aug 07, 2016, 06:16 am Last Edit: Aug 07, 2016, 06:30 am by be80be
Thanks for telling what I know yes i looked at data sheet yes I know it's dividing the clock by 8 and yes I for got to ask what I wanted to no In my first post. I want to no how to set fuse old steve I tried that still got clock set for the 8 divided by 8 so Im 1 mhz LOL
Old Steve you was on the same page I got a 8 mhz clock now LOL I had to unplug the arduino and plug it back in then run burn bootloader to set it to 8 mhz Thanks
See it programed but the burn bootloader must do a little something different you can't do it after you load program without resetting the arduino.

OldSteve

Thanks for telling what I know yes i looked at data sheet yes I know it's dividing the clock by 8 and yes I for got to ask what I wanted to no In my first post. I want to no how to set fuse old steve I tried that still got clock set for the 8 divided by 8 so Im 1 mhz LOL
Old Steve you was on the same page I got a 8 mhz clock now LOL I had to unplug the arduino and plug it back in then run burn bootloader to set it to 8 mhz Thanks
Good one. It takes a little getting used to, since you have to do the "Burn Bootloader" step even though you're not actually using a bootloader, but that's how the fuses are set.
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

be80be

What got me was I programed the blink first and then you can't burn the bootloader to set the fuses I guess it changed states to programer mode But after I reset the arduino as ISP then set the fuse It worked.
These chips be fun to play with.

OldSteve

These chips be fun to play with.
I haven't tried an ATtiny2313 yet, just the '84 and '85 in the ATtiny range. Great for small projects, or add-on peripherals for a bigger chip.
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

DrAzzy

Imo the 2313 is a very boring chip, it just doesn't hold a candle to the newer attiny chips. Hardly any flash, kinda pricey, crap peripherals - only good feature is the uart. The 841/441 and 1634 both bury the x313s - they're cheap (841 is at least, 1634 not as much), have two uarts, usi or spi, adc on every pin, and enough memory to do fun stuff with. The 841 in particular - dual 16 bit timers, remapping pwm pins, and the differential adc features - and they're just pennies more than the 84.
ATTinyCore and megaTinyCore for all ATtiny, DxCore for DA/DB-series! github.com/SpenceKonde
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

be80be

They was 99 cents and I got some more attiny chips 85 but I want to make programmer with one of the 2313 but I don't have any 3.6 zenner diodes I was thinking maybe 2 white leds to clamp the data lines with they 3.6

DrAzzy

I would not be comfortable with leds for tha t purpose unless you'd compared them to a zener diode with a curve tracer to make sure it won't put a damaging voltage onto the usb data lines.

Zener diodes are insanely cheap. Search eBay for "zener diode kit" - and if you buy more of a specific size you can get them cheaper still. Is it really worth it to save a few cents?
ATTinyCore and megaTinyCore for all ATtiny, DxCore for DA/DB-series! github.com/SpenceKonde
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

be80be

I just didn't have any a 3.6 volts I have 50 3.3 volt maybe 100 5.1 and some 12 volts but I seen a appnote using leds for this some where. I have maybe $10,000 in parts LOl just waited a week to get some stuff in and I realized that I need some 3.6 volt ones that's a week wait and right now i don't need anything but them. I like to buy a bunch at a time to save shipping. 

DrAzzy

#14
Aug 07, 2016, 09:39 pm Last Edit: Aug 07, 2016, 09:40 pm by DrAzzy
I bet a 3.3v zener will work fine...

I'd use that before trying to bodge something up with leds.
ATTinyCore and megaTinyCore for all ATtiny, DxCore for DA/DB-series! github.com/SpenceKonde
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Go Up