| 
 | 
	
    
没用过ATMEGA329P,用ATMEL16\32,用它的库来读写EEPROM,这是用AVR编译器的# z- s% z' _: h* J 
#include <avr/eeprom.h> 
) D+ \4 X- f( L  J. O: _2 q% Cvoid EEPROM_WRITE(unsigned char eep_address,unsigned char wr_number,unsigned char* p_header) 
) E; I& B  `1 x" L0 j$ m, f, P{         
% R8 @2 a- y- P/ b; Y  |% H8 e3 u        eeprom_busy_wait();/ A1 e( O& f6 J& n; [* J- [ 
        eeprom_write_block (p_header,eep_address, wr_number); 
- _' o* g! G5 x8 x4 m}; [% Q! N: v( H( B% j5 s2 ] 
 
- j5 i/ S. R. f& p2 ~5 m8 ?% ~void EEPROM_READ(unsigned char eep_address,unsigned char rd_number,unsigned char * p_header) 
. _4 C$ c8 l2 i7 W8 ?- ^: j. Y* z{8 N+ f2 [+ F5 K$ l  u% D: u 
        eeprom_busy_wait();3 |" k$ t  _/ A: `+ K  v' s; r 
        eeprom_read_block (p_header,eep_address,rd_number); 
9 B8 |' z9 H0 a/ y" U& x& L}% X9 h7 i9 f+ C3 ~ 
 |   
 
 
 
 |