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

Just a simple question
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
RLScott



Joined: 10 Jul 2007
Posts: 465

View user's profile Send private message

PostPosted: Sat Jan 24, 2009 8:41 am     Reply with quote

FvM wrote:
BTW, did you notice the PCW IDE's Device Editor tool and it's option, to generate SFR include files? Smile


Is it possible for me to generate those SFR includes files if all I purchased was the command-line PCM program, and even that is about 2 years old?
_________________
Robert Scott
Real-Time Specialties
Embedded Systems Consulting
dyeatman



Joined: 06 Sep 2003
Posts: 1985
Location: Norman, OK

View user's profile Send private message

PostPosted: Sat Jan 24, 2009 10:02 am     Reply with quote

Unfortunately the create SFR function is part of the Device Editor that only comes with the IDE. You can select which registers are included in the generated file such as Interrupt, CCP, SPI, UART registers etc. You can even select whether you want 8 bit Low/high registers combined into 16 bit registers. Below is a portion of an SFR file it generated for an 18F4520.

Code:
#byte TOSU = 0xFFF
#byte TOSH = 0xFFE
#byte TOSL = 0xFFD
#byte STKPTR = 0xFFC
#bit    SP0 = STKPTR.0
#bit    SP1 = STKPTR.1
#bit    SP2 = STKPTR.2
#bit    SP3 = STKPTR.3
#bit    SP4 = STKPTR.4
#bit    STKUNF = STKPTR.6
#bit    SKTFUL = STKPTR.7
#byte PCLATU = 0xFFB
#byte PCLATH = 0xFFA
#byte PCL = 0xFF9
#byte TBLPTRU = 0xFF8
#bit    BIT 21 = TBLPTRU.5
#byte TBLPTRH = 0xFF7
#byte TBLPTRL = 0xFF6
#byte TABLAT = 0xFF5
#byte PRODH = 0xFF4
#byte PRODL = 0xFF3
#byte INTCON = 0xFF2
#bit    RBIF = INTCON.0
#bit    INT0IF = INTCON.1
#bit    TMR0IF = INTCON.2
#bit    RBIE = INTCON.3
#bit    INT0IE = INTCON.4
#bit    TMR0IE = INTCON.5
#bit    PEIE/GIEL = INTCON.6
#bit    GIE/GIEH = INTCON.7
#byte INTCON2 = 0xFF1
#bit    RBIP = INTCON2.0
#bit    TMR0IP = INTCON2.2
#bit    INTEDG2 = INTCON2.4
#bit    INTEDG1 = INTCON2.5
#bit    INTEDG0 = INTCON2.6
#bit    RBPU = INTCON2.7
#byte INTCON3 = 0xFF0
#bit    INT1IF = INTCON3.0
#bit    INT2IF = INTCON3.1
#bit    INT1IE = INTCON3.3
#bit    INT2IE = INTCON3.4
#bit    INT1IP = INTCON3.6
#bit    INT2IP = INTCON3.7
#byte INDF0 = 0xFEF
#byte POSTINC0 = 0xFEE
#byte POSTDEC0 = 0xFED
#byte PREINC0 = 0xFEC
#byte PLUSW0 = 0xFEB
#byte FSR0H = 0xFEA
#byte FSR0L = 0xFE9
#byte WREG = 0xFE8
#byte INDF1 = 0xFE7
#byte POSTINC1 = 0xFE6
#byte POSTDEC1 = 0xFE5
#byte PREINC1 = 0xFE4
#byte PLUSW1 = 0xFE3
#byte FSR1H = 0xFE2
#byte FSR1L = 0xFE1
#byte BSR = 0xFE0
#byte INDF2 = 0xFDF
#byte POSTINC2 = 0xFDE
#byte POSTDEC2 = 0xFDD
#byte PREINC2 = 0xFDC
#byte PLUSW2 = 0xFDB
#byte FSR2H = 0xFDA
#byte FSR2L = 0xFD9
#byte STATUS = 0xFD8
#bit    C = STATUS.0
#bit    DC = STATUS.1
#bit    Z = STATUS.2
#bit    OV = STATUS.3
#bit    N = STATUS.4
#byte TMR0H = 0xFD7
#byte TMR0L = 0xFD6
#byte T0CON = 0xFD5
#bit    T0PS0 = T0CON.0
#bit    T0PS1 = T0CON.1
#bit    T0PS2 = T0CON.2
#bit    PSA = T0CON.3
#bit    T0SE = T0CON.4
#bit    T0CS = T0CON.5
#bit    T08BIT = T0CON.6
#bit    TMR0ON = T0CON.7
#byte OSCCON = 0xFD3
#bit    SCS0 = OSCCON.0
#bit    SCS1 = OSCCON.1
#bit    IOFS = OSCCON.2
#bit    OSTS = OSCCON.3
#bit    IFCF0 = OSCCON.4
#bit    IRCF1 = OSCCON.5
#bit    IRCF2 = OSCCON.6
#bit    IDLEN = OSCCON.7
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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