This is an Attiny13A

This is an Attiny13A.
It has some super awesome speccs:
>9.6MHz
>1024 Bytes Flash
>64 Bytes SRAM
>64 Bytes EEPROM
>2 PWM Channels
>1 8-Bit Timer

Any ideas what I could do with it? I'd like to finish this day of with a small project. Some fun. Any ideas for a """challange"""?

PS: I have lots of garbage laying around here. So just be creative

Attached: IMG_5228.jpg (1952x1271, 726K)

you fucking idiot. it isn't even connected to anything. at least wire it up correctly

install gentoo

No shit. He's asking what to do with it, not showing what he's already done.

Hahahahaha atmlel kys you fucking pleb

Get some IR LEDs and IR photoresistors, and make an infrared communication device.

Attach a small speaker to it and make it an electronic cricket to annoy people.

>Timer
make a clock

I have always liked the idea of counters for tracking mundane things around the house. Maybe wire it up to a 7-segment display and give it a button to increase the number in the display, and whenever you make a cup of coffee you increment the number by the estimated caffeine content. Over months, you get to see how much you drink. It's trivial, amusing.

This is a nice idea for this evening.
Today I'll only do one digit, because I first need the shift register to work since the attiny13 has only 5 output pins.
For full 4 digit 7-segment display we would need 11 pins. THerefore I'll use a 74HC595 shift register. Maybe two. Depends. But one for today

forgot pic

Attached: IMG_5229.jpg (3000x2000, 322K)

wiring done. Now we kode.

Attached: IMG_5231.jpg (3000x2000, 372K)

quick explanation:
Output enable (OE) is always low, because negative logic. That way we always see the output, even while shiftig. But it's short enough that we don't care.
Serial clear (SCLR) is always high, because we don't want to clear. If we want, then we just shift in 8 zeros.

Attached: shiftregister.png (802x402, 149K)

I'll make it myself a little bit tricky and implement the shift register without copy paste from stackoverflow or something. Just according to the datasheet.
Yes, i already did implement it a while ago, but i don't know it out of my head and i dont have the source anymore. So we'll do a little refreshing exercise

Attached: diagramm.png (976x882, 63K)

Install Windows 10

Why do people use Atmel shit? Because of DIP?

because its easy to understand, has a good community and is not clusterfucked like 32bit shit

Are you going to become the next clock boy

OP this is basically just a blog post at this point but I can't complain because it at least seems like you're being constructive and trying to start a conversation, and this is inherently more interesting than 90% of the threads right now.

Jow Forums is for consumer support

So like challenges, you say...
...Hmst...
Run crysis

Smol kaypad thing for computer macros.

Because it's easy and there's plenty of support and tutorials for beginners on the internet. Also, arduino.

This makes me so sad, and yet is so true...

Nice clock Muhammad

Congrats OP. You've made the only real technology related thread I've seen in a long time. Legitimately you've slightly improved the board. It's to bad 98% of Jow Forums are brainlets who don't understand simple shit like clock rates or EE in general.

Don't be a faget op. Show us your oscilloscope

>he loops his power rails

Attached: don't like it.gif (500x511, 136K)

Build a sound recorder

You're supposed to do that nigglet, unless you want different voltages on each side.

How many GPIO pins has this thing got, 1?

How do you get started with learning about this stuff? Would it be a book/course on Electrical Engineering?

make an Atari Punk Console

build a tiny robot powered by solar cell.

Not OP. There's a dude called Been Eater in YouTube that has a pretty in depth set if videos about making a small 8 bit computer, as well as low level assembly type stuff. Pretty interesting but a lot of the hardware stuff goes over my head.

Make your own rubber ducky implementation.

Attached: 1522888828992.webm (1376x476, 2.35M)

why retards can't learn from datasheets and books? why you have to watch videos?

ok, please kys , please. how old are you 15?

you have to learn other things first to understand the datasheets

>not indenting your if/else blocks

Attached: 1524965201196.jpg (1280x720, 94K)

what would you expect from a person who uploads the video of an nodemcu doing brainlet tier shit?

No filter caps?

if he uses a linear power supply, usb port or even a battery filter caps are a meme for 9Mhz

Make a logo

Makes sense. I'm a poorfag so all of my breadboards are powered by a 5v linear regulator + 9v battery and the caps seem to help.

whats wrong with atmel? cheap and easy, sure their 8-bit products are not as powerful as some other things out there, but it works great for small and easy projects

There is nothing wrong with atmel, the only ones thats sucks are the old PIC (the memory layout its crap) and Intel shit.

Atmel is good , ST is good, Freescale is good, PIC is shit but it has good stuf like the 32bits ones and 18Fx family.

You only need 1 power rail.
Change my mind.

>Any ideas for a """challange"""?
Do a barrel roll

redpill me on atmel vs arm

Make quad-'core' computer with those attinies

clean, place some capacitators between your power supply and GND right next to the pins on your components. Remember to put them right next to the pins, you want to short the distance between the pin and your caps for them to be as good protection as possible from spikes caused by ESR/ESL

Buy a 100 in 1 electronic project kit and go through the projects. Don't wire anything up unless you know what's going on. The guide with the kit will give you a mile high overview of things, but for best results buy an intro to electrical analysis textbook and read the chapters on things when you get to them.

By the end you'll have a working familiarity with basic components. Then you can start actually learning. Read through the electrical analysis book properly and do the exercises. Knowing calculus helps a lot, but isn't required. Then get a book on digital circuits and do the exercises. Read Wikipedia articles on things you feel aren't covered well by the books.

Congrats, that's 50% of what you get in a two year EE program for like a couple hundred bucks. At this point you have a foundation to work from. Any real project you want to do is within reach since you'll know how to learn what you need when you inevitably hit walls.

There is no atmel vs arm because Atmel also has ARM based µc.

fuck that just go drop like $200 on a breadboard, some wire, a resistor pack, a capacitor pack, some transistors and some LEDs and pick up a pamphlet on how to read a schematic.
Start hooking up wires semi-randomly and you'll learn quick enough.

Electrical engineer here. I'm surprised to find this on this Jow Forumsay board. Well done.

Shorter power links.

if your layouts are weak

You will learn nothing but how to effectively cargo cult that way. Without a foundation you'll run into situations where you don't know that you don't know, and the things you build will be a mystery to you. Very smart people (smarter than you) have spent literally lifetimes figuring this shit out and thankfully they wrote it all down. Why would you fumble around in the dark when you have a flashlight?

You can read books without buying project kits.
I'm not saying do all the discovery yourself, I'm just very anti-project kit. Just buy real parts and start freeform making real things.

>2 PWM Channels
Also known as your left speaker and right speaker.

Multi project kits provides very simple lab work, spring terminals are nice for total beginners, and the diagrams laid out next to each component visually teaches the symbols and pin locations for things. I bet half the engineers out there over 25 years old got their start on a ratshack 100-1 kit and are thankful for it.

You're probably thinking from the perspective of someone who has a clue. Total beginners get lost very easily. For them, the kit guarantees they can do the exercises without being able to fuck up by not having enough things, having the wrong thing, not being able to find a thing, or not being able to tell which thing is needed.

You know, I guess you're right.
It's easy to lose track of how difficult it is to start out after you get a basic handle on things.

5 or 6, depending if you keep the reset pin
Needs 12v to reset/reprogram if you get rid of it

Fucking this. Do it, OP.

>nodemcu
It's an ESP8266 running Arduino code. NodeMCU is a firmware for the ESP8266 that clearly isn't used here.

Bullshit, use lasers and normal LEDs instead.

Literal autism.

> lasers
Can be done using just leds also

specs for a smooth-ish scrolling display script on an tiny85 - with quite a bit of headroom / no shifters or other active bits, just leds and resistors
full standard single-case alphanumeric
all pins in partial use (1-2/3 states free)
> Sketch uses 2052 bytes (25%) of program storage space. Maximum is 8192 bytes.
> Global variables use 97 bytes (18%) of dynamic memory, leaving 415 bytes for local variables. Maximum is 512 bytes.

Do your own homework

>2nd year EE
>Cant do shit in ops pick
Im fucked right?

Attached: 1526154374497.png (632x1352, 290K)

Considering you can learn it in one day, not really.

build a vibrator.
bonus points if you use it to give yourself a prostate orgasm.

Make a synthetizer

OP here.
Was too tired to finish my blogpost yesterday. Today I'll have some leasure time and finish it up. Uni projects can wait for now.
Shift register works. It's quite simple logic:

void shift_init()
{
SHIFT_REG |= (1

Attached: easy.webm (1280x720, 394K)

You could also use LED driver MAX7219 for up to 8 digits

Give me the rundown on this attiny vs a arduino nano clone.

Imagine It's powering a RC car as the intended purpose.

The chip doesn't work without some basic circuitry. Whatever he's going to do, he will need to fix that.

You should connect them separately directly from the source if you want to do it right

Wiring done. Tried to improve my breadboard wiring. It's okay now, i think.

Arduino has usually a atmega328p on it. Which is WAY more powerful. Dont know about the arduino nano though.

Attached: nice.jpg (2458x3000, 539K)

left segment seems not to be working 100%, but that's irrelevant.

Attached: works.webm (1280x720, 700K)

Maybe not Crysis, but you could make a game console out of it, there are some e.g. based on overclocked ATMega644 (28.63MHZ), VGA or RGB (as in SCART) output is easy to get, maybe something with composite video would be feasible (probably all 8pin AVRs memory is way too scarce)

On 6/8 pin MCUs you could make dumb shit game like I did(needed to replace original 'cдeлaнo в cccp" part) ,you need
* light pistol (trigger, capacitor, battery and lightbulb)
* and receiver (MCU+photoresistor with resistor to make voltage divider + LED, about 5 pins total).
Check if ADC signal from photoresistor raised for e.g 50 units (out of 1024) and light diodes for a second or two.

numbers work.
next up: multiplexing. For now with only two numbers, since i only have 7 pins left. Later maybe with a second daisy chained shift register

Attached: numbers.webm (1280x720, 1.07M)

but first it's pizza time, cause I am hungry.

oh btw: the (((kode)))
#include
#include
#include "shift_out.h"

#define F_CPU 1200000

uint8_t numbers[10] = {
0x3f, // 0
0x06, // 1
0x5b, // 2
0x4f, // 3
0x66, // 4
0x6d, // 5
0x7d, // 6
0x07, // 7
0x7f, // 8
0x6f // 9
};

int main()
{
int i;
shift_init();

while(1) {
for(i = 0; i < 10; i++) {
shift_out(~numbers[i]);
_delay_ms(500);
}
for(i = 9; i >= 0; i--) {
shift_out(~numbers[i]);
_delay_ms(500);
}

}


return 1; //never reached
}

here's a picture of the pinout which results in that numbers array.

Plus since we have a common anode we need to flip all bits for negative logic

Attached: segment.png (884x403, 11K)

yeah, the nanos i have are 328p's

generally they will still run at the same clock, but with more pins & extra sram, flash, and eeprom memory

delay.h requires F_CPU defined before including. You shouldn't define it in C files,but pass as compiler flag
gcc -DF_CPU=1200000 main.c

Oh thanks! Didnt know that, but it makes sense. Got it declared in the Makefile anyways. Not sure why I declare it in C file too

That's my last blog post for today, I think. I am lazy.
Still a bit of place left on that chip, but no pins rn (that's why i need more shift registers). Maybe even do the segment display with discrete logic. will see. But not today.

Program: 518 bytes (50.6% Full)
(.text + .data + .bootloader)

Data: 14 bytes (21.9% Full)
(.data + .bss + .noinit)


le code:

#include
#include
#include
#include "shift_out.h"

uint8_t numbers[10] = {
0x3f, // 0
0x06, // 1
0x5b, // 2
0x4f, // 3
0x66, // 4
0x6d, // 5
0x7d, // 6
0x07, // 7
0x7f, // 8
0x6f // 9
};

int curr_number = 0;
int curr_dig = 0;

ISR(TIM0_COMPA_vect)
{
int n;
switch(curr_dig) {
case 0:
PORTB |= (1

Attached: mux.webm (1280x720, 593K)

holy shit, i just realized what a dumbfuck nigger i was. I knew that delay in the interrupt was bad. Like really bad, but i didnt know how to keep the current active pin on for some time.
Now i realized that i can just turn one of one on, on every interrupt call. Like this:
ISR(TIM0_COMPA_vect)
{
int n;
switch(curr_dig) {
case 0:
PORTB &= ~(1

Ok we are going on.
I tried to do three digits. But either the t13 is too slow or my timings are odd. Not sure...

Attached: IMG_5245.jpg (3000x2000, 398K)

... because my camera proves that it actually pushes out the correct data. Just not long enough.

Attached: IMG_5243.jpg (3000x2000, 130K)

got it.
Two pins and ~400 bytes left.

Attached: IMG_5249.jpg (3000x2000, 401K)

Attached: three.webm (1280x720, 683K)

Make a pi number calculator, calculate how much it it takes to get into the 100 decimal number.

Good thread OP, I hope you could make something like this I have just posted

thank, m9. Yeah i sometime also thought about how long it would take to calculate the sum of all primes below 2 million on something like this, but if you'd do that really with checking every number itself it would take ages.

I've now built a debounced switch. I found a beefy one in my drawer which i will attach to my drawer now, I think. Just to see how often i open it.

Attached: triggered.webm (1280x720, 1.99M)

Attached: IMG_5252.jpg (3000x2000, 1.84M)

8bit AVRs don't have FPU or native suport for 32/64 bit arithmetic. Compiler has to generate addiotnal code for those operations and it comes with performance and size cost

See if it can get you to lose your virginity.