CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

18F26K22 and SETUP_ADC_PORTS

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
hmmpic



Joined: 09 Mar 2010
Posts: 314
Location: Denmark

View user's profile Send private message

18F26K22 and SETUP_ADC_PORTS
PostPosted: Wed Feb 02, 2011 5:48 am     Reply with quote

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: 19549

View user's profile Send private message

PostPosted: Wed Feb 02, 2011 9:26 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Feb 02, 2011 10:55 am     Reply with quote

Thanks:-)
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group