Programming Arduino with an AVRISP MKII programmer

Identify which Arduino bootloader do I have
CRC 2048b @ 0x7800 = CD70
CRC 512b @ 0x7E00 = FD70
Boot loader: OptiBoot 4.4
// Detect which type of boot loader is present, using a fixed built-in table |
Arduino通过74HC595扩展IO
74HC595是一个价格廉宜的8位移位寄存器,通过3个数据引脚(STCP, SHCP, DS),可以控制几乎无限量的输出。
DS是一个串行数据输入端,每当时钟输入(SHCP)上升沿到来时,DS引脚当前电平值在移位寄存器中会移一位,连续进行8次同样的动作,就可以完成全部(Q0至Q7)移位。最后当STCP(Latch)上升沿到来时,移位寄存器的值将会被锁定在存储器里,并从Q0至Q7引脚输出。
Arduino UNO只有14+6个数字输出,如果需要更多的输出,其中之一的方法就是通过74HC595来取得更多的输出。
Arduino BIT manipulations
- x: the numeric variable whose bit to set
- n: which bit to set, starting at 0 for the least-significant (rightmost) bit
//initialized all pins to LOW |
- x: the numeric variable whose bit to clear
- n: which bit to clear, starting at 0 for the least-significant (rightmost) bit
//initialized all pins to HIGH //set the third pin LOW |
- x: the numeric variable to which to write
- n: which bit of the number to write, starting at 0 for the least-significant (rightmost) bit
- b: the value to write to the bit (0 or 1)
byte pinState= 0; //initialized all pins to LOW (B00000000)
bitWrite(pinState, 0, HIGH); //set first pin to HIGH, pinState = B00000001 bitWrite(pinState, 3, HIGH); //set third pin to HIGH, pinState = B00001001 bitWrite(pinState, 0, LOW); //set first pin to LOW, pinState = B00001000
|
-
x: the number from which to read
-
n: which bit to read, starting at 0 for the least-significant (rightmost) bit
byte pinState = B10101010;
for (int i=0; i<8; i++) {
theBit = bitRead(pinState, i);
}
|
Using 74HC595 Shift Registers with Arduino

- Using 74HC595 Shift Registers with Arduino
- Daisy chaining 74HC595 shift registers
- Different ways (binary, decimal, hex) to hold the data using an array
- Using bitshift, bitwrite operators
- Direct port access for faster manipulation of the IO pins
Minimal Arduino with 8MHz internal clock

-
ATmega328
-
28 pins IC socket
-
10K resistor
-
Strip board
SalMonDuino: A simpletest ATMega328 Arduino

- Using stripboard eliminate the trouble of drilling PCB holes
- Simple circuit design uses minimum of components
- Using 16MHz resonator as clock source
- Prototype area
魔镜制作,男人小心,女人担心
为了拯救女人深爱的男士,英俊帅气的我不惜动用大量资金以及耗尽一生青春,同时冒著精流不止的生命危险去研究魔镜,今天终于解开了魔镜千年之谜。
Arduino communicate with Vixen Lighting Control Software

Arduino电子密码锁

- EEPROM字串存取
- 运用#include文件,把谋些函数(function)调去外部文件
- 简单的旋律处理
- 日期与时间处理
- 如何形成Press and hold
- 矩阵键盘应用与空闲(idle)侦察
- 密码处理与验证
- i2c LCD应用
- 非阻塞编程(Non blocking programming)