新手問題_P18f4520.h
|
||||
---|---|---|---|---|
新會員
|
對暫存器位址的定義有些問題,下面是部分定義
-------------------------------------------------------- extern volatile near unsigned char PORTA; extern volatile near union { struct { unsigned RA0:1; unsigned RA1:1; unsigned RA2:1; unsigned RA3:1; unsigned RA4:1; unsigned RA5:1; unsigned RA6:1; } ; struct { unsigned AN0:1; unsigned AN1:1; unsigned AN2:1; unsigned AN3:1; unsigned T0CKI:1; unsigned SS:1; unsigned OSC2:1; } ; struct { unsigned :2; unsigned VREFM:1; unsigned VREFP:1; unsigned :1; unsigned AN4:1; unsigned CLKOUT:1; } ; struct { unsigned :5; unsigned LVDIN:1; } ; } PORTAbits ; -------------------------------------------------------- 1.請問一下,我知道'near'應該是指將暫存器名稱位址定義到RAM中的Access Bank中,但是為什麼是從F80h開始安排呢? 2.暫存器PORTA和PORTAbits的定義不是兩個不同敘述嗎?PORTAbits不會另外有空間嗎? 初學問題可能很無聊 先謝過看完小弟問題的版友!
發表於: 2008/6/21 1:12
|
|||
|