Easy, fast, big online Community.

With hello board, i must, program it, test it.
The best and quick way to do that is use Arduino.
Arduino is super easy, have ton's of library's and if you search online we find huge amount of information.
Standard Arduino not comes with support for Attiny, so i find
here
After the installation, i thought why not an
heart beat . I want to see if the board is alive ;)
After the test,
i reprogram it in order to use the button.
For do that first i search the arduino pinout for attiny

After that and because our button suppose to have a pull-up resistor i first search it in the
datasheet at page 55
Because we are using arduino, we have a function to do just that, easy and clean
digitalWrite(ButtonPin, HIGH); // After define our in pin as input, turn on pull-up resistors
So we can play this board is measuring our heart beat ;)
C! i drive please
The power of C language on a tiny microcontroler
Arduino is super super interesting as a easy to use and quick to develop your application, i real recommend it for the early stage of development, because, in 10 minutes i could made and test the heart bit of aliveness of the hello board.
So it is in fact very very good for you test if your project idea will work.
But, when you want control, when you want to do the more for your self, C is the natural choice.
Is the main language, is lower enough to the hardware control, and higher enough to give us an abstraction level until object programming and more.
So first, i recommend what Neal said, choose a program, that you know that work's and program it into your board.
I do that with hello world.c
It proves to be a good exercise, that way i could test mac command line, compile steps and program one.
It's no big deal, i just found a brew mix for mac, that makes easy to install all the file's necessary for c programming and avrdude for put hex file in board.
brew install avr-gcc avrdude avr-libc libusb
I have some problem's with
brew link pkg-config
so i recomend:
brew tap larsimmisch/homebrew-avr
and if needed you can follow the mesages in the terminal
chown -R yourusername /usr/local
chmod -R u+w /usr/local
here is the example link PHOTO
And the code is?...
// set port pin PORTB2 as input and leave the others pins
// in their originally state (inputs or outputs, it doesn't matter)
DDRB &= ~(1 << PB2);
output_high(PORTB, PB2);
This code enable the pull-up's
if ( (PINB & (1 << PB2) ))
{
output_low(PORTA, LED);
_delay_ms(100);
}
else{
output_high(PORTA, LED);
_delay_ms(100);
}
And that makes the push button led on.
Than the program and compile protocol
make -f hello.ftdi.44.blink.c.make
make -f hello.ftdi.44.blink.c.make program-usbtiny-fuses
make -f hello.ftdi.44.blink.c.make program-usbtiny
ASM - ASSEMBLER is the SUPER MASTER of control
When you need to control everything at a real low level.
I believe in multi language programming.
If i need speed programming - Arduino
If i need power and control - C.
If i need to control every bit of it and it is critical for performance - Assembler.
Assembler is a bit rough and have a low abstraction level, but for program "libraries" and "drivers" inside the microcontroler and inside of your program it is the best way, for you control in did everything.
Sometimes the C compiler asumes some control of something, manage's the memory in some way. Here in assembler we choose all the step's and that is very important for us extract all the juice from the microcontroler.
Installing Avra
A big challenge is how to install the compiler.
i find it
here.
but
brew humm i love
brew, easy and tasty.
It goes find all the latest libraries and install it easy and clean for me.
here it is the steps to install avra by
brew.
brew install avr-gcc avrdude avr-libc libusb
brew link pkg-config
brew tap larsimmisch/homebrew-avr
...
.....
I like Fiore work's so i follow him in program the board.
But Fiore... wait we just compile... we need to put it inside the attiny, mean we need program it.
No worries, we have avrdude.
I inspire my self in the line that is in the make file of the "program an fab ISP"
and here what i use and the Final result.
Atmel - studio
The fabricant pltafrom, always the latest
I cry, and cry...
Atmel studio is huge, it's really and easy for us to make a program, but...
And is windows only, but why...
But let's dive into the fact's
Atmel studio give us some abstraction, in them we can code directly as in assembler as in C.
then we press program and it's done.
I will love to try the debugger tool but i only have the pour MKII program, not bad, but it's not a debugger.
32 bit's platform's
When processor power is the thing.
I have not 32 platform yet but still on touch i will have and write something here ;)
Computer in a chip
SOC - system on a chip, when we could put an all roam in a single chip
Indeed, today Raspberry pi is more power full that my first computer, i play a lot in the past with raspberry pi.
For play with it i recommend some basic's in linux, and then...
Peopleware - an with everything version os Operating system for Raspberry pi
Adafruit began tutorial is a must follow for you to understand all the power and all the easy way of Raspberry pi.
Have in mind that Raspberry pi is only one of many linux SOC platform's in the market.
If you want you could create your own one.
I do it with this bulgarian site olimex.
I spend a month design the board and another to make it.
It's another level...
Here is the
link to this week files. :)