View previous topic :: View next topic |
Author |
Message |
hmmpic
Joined: 09 Mar 2010 Posts: 314 Location: Denmark
|
18F26K22 and SETUP_ADC_PORTS |
Posted: Wed Feb 02, 2011 5:48 am |
|
|
Hi
Just switch from a smaller PIC to this one, and now the function SETUP_ADC_PORTS make this code?
Can any explain what the x38,x39... is?
Code: |
SETUP_ADC_PORTS(P_ADTemp|VSS_FVR);
084A: MOVF ADCON1,W
084C: ANDLW F0
084E: IORLW 08
0850: MOVWF ADCON1
0852: MOVLW 01
0854: MOVLB F
0856: MOVWF x38
0858: MOVLW 00
085A: MOVWF x3C
085C: MOVWF x39
085E: MOVWF x3A
0860: MOVWF x3B |
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19499
|
|
Posted: Wed Feb 02, 2011 9:26 am |
|
|
Selected bank number.
So at B54, bank is set to 'F', giving B5A to B60, clearing locations F3C, F39, F3A and F3B, and B56 putting 1 into F38.
These are the ANSEL registers.
Best Wishes |
|
|
hmmpic
Joined: 09 Mar 2010 Posts: 314 Location: Denmark
|
|
Posted: Wed Feb 02, 2011 10:55 am |
|
|
Thanks:-) |
|
|
|