I want to do becasue I love using Arduino but wanted to move up in to making bootloaders and other programs without being held back by the arduino bootloader it self. If you ever looked at the TV-Be-gone device software you will see the Arduino bootloader is not on it. If you understand Arduino you will understand this too. It is not simple or easy neither.
Is to download Atmel Studio 7... Click Here to downloadand also buy the Atmel ICE avr programer. You can get if for digikey.com by Clicking Here.
Pin Configration for Atmel ICEChip Connector
PB1 ----> Pin1
PB0 ---> Pin4
PB5 ---> Pin5
PB2 ---> Pin3
GND ---> GND
VCC ----> VCC
IMPORTED TO KNOW
When Programming the chip you need to power it with a standalone voltage source. The ICE don't power the Chip set that you program.
If you want to know more about the chip you are using, you can go to the full datasheet and read about fuses, and registers that the chip has and how to use it with program examples in C and machine language. Click here to view the ATtiny85 datasheet.
The Registers...With the ATtiny85 to do I/O pin you have to configure three registers. The registers are like light switch that turn on and off functions on the chip set.
The Data Direction Register(DDRx) tells the chip if the pins are input or output if you set the pin you want to 1 it is a out with this DDRx if it is 0 in is input. For the ATtiney85 this registry is named DDRB.
The PORTx Register is where you turn on with pin you want to use.
The PINx Register is where you reseave the pin input to do what you want in the software side of the code.
How to Bit Shift...How do you bit shift? Will you use the << or >> the first one is bit shift to the left and the other is bit shift to the right. so if you want this binary (0b00000010) you would do this (1 << 2). In the program you will find _BV() or (1 << PB2) both are micros that have a defined file that do this for you.
Also it is worth tell you that you do have and, or, or xor too.
They look like this...
OR ( | ) 10101 | 00110 = 10111
AND ( & ) 10101 & 00110 = 00100
XOR ( ^ ) 10101 ^ 00110 = 10011
NOT ( ~ ) ~00110 = 11001
Why Use This Over Arduino?Arduino is open source and don't have protections if you want to make a projected that you would like to sell to the public.
The AVR has fuses that you can set to lock the chip where you cannot download the hex file to that chip. This is called bit locking.
Comments
Please log in or sign up to comment.