A header wizard - Page 4


Results 121 to 160 of 230

Thread: A header wizard

Threaded View

  1. #11
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Peter, Great Job! Very nice. Thanks for putting it together!

    Quote Originally Posted by mackrackit View Post
    PROBLEM...

    I thought the MPASM *.inc file had all of the info we needed for this but now it looks like I am wrong.
    Me too!

    It looks like this information is stored in mplab ide. Its a little harder to read though.

    It is located here: C:\Program Files\Microchip\MPLAB IDE\Device

    In my search, I came across a video presentation of Microchips Visual Device Initiator. Sad to say, I am drooling at the 2004 technology. Fast forward to about 11 minutes in or so. It is kind of like a config wizard, and PicMultiCalc all in one. http://techtrain.microchip.com/media/websem/VDI_082604.wmv or check out http://www.scalerobotics.com/VDI Tutorial.pdf

    Code:
    ######################################################################
    #
    # MPLAB IDE .dev File Generated by `pic2dev.py'
    #
    # Device: PIC16F676
    # Family: 16xxxx
    # Datasheet: 40039
    # Date: Mon Apr  5 06:55:05 2010
    #
    ######################################################################
    
    
    ######################################################################
    #
    # Memory Regions & Other General Device Information
    #
    ######################################################################
    
    vpp (range=12.750-13.250 dflt=13.000)
    vdd (range=2.500-5.500 dfltrange=3.000-5.500 nominal=5.000)
    pgming (memtech=ee tries=1 lvpthresh=4.500)
        wait (pgm=2000 eedata=6000 cfg=2500 userid=2500 erase=6000 lvpgm=2500)
        latches (pgm=1 eedata=1 cfg=1 userid=1)
    EraseAlg=4
    UndefCfgBits=0
    breakpoints (numhwbp=1 datacapture=false idbyte=x)
    calmem (region=0x3ff-0x3ff)
    userid (region=0x2000-0x2003)
    testmem (region=0x2000-0x20ff)
    devid (region=0x2006-0x2006 idmask=0x3fe0 id=0x10e0)
    cfgmem (region=0x2007-0x2007)
    eedata (region=0x0-0x7f)
    bkbgvectmem (region=0x2004-0x2004)
    pgmmem (region=0x0-0x3ff)
    NumBanks=2
    MirrorRegs (0xa-0xb 0x8a-0x8b)
    MirrorRegs (0x2-0x4 0x82-0x84)
    MirrorRegs (0x0-0x0 0x80-0x80)
    MirrorRegs (0x20-0x5f 0xa0-0xdf)
    UnusedRegs (0x60-0x7f)
    UnusedRegs (0xe0-0xff)
    
    ######################################################################
    #
    # Special Function Registers
    #
    ######################################################################
    
    sfr (key=INDF addr=0x0 size=1 flags=i access='u u u u u u u u')
        reset (por='--------' mclr='--------')
        bit (names='INDF' width='8')
    sfr (key=TMR0 addr=0x1 size=1 access='rw rw rw rw rw rw rw rw')
        reset (por='xxxxxxxx' mclr='uuuuuuuu')
        bit (names='TMR0' width='8')
        stimulus (scl=rwb pcfiles=w regfiles=w type=int)
    sfr (key=PCL addr=0x2 size=1 access='rw rw rw rw rw rw rw rw')
        reset (por='00000000' mclr='00000000')
        bit (names='PCL' width='8')
        stimulus (scl=rwb pcfiles=rw regfiles=w)
    sfr (key=STATUS addr=0x3 size=1 access='r r rw r r rw rw rw')
        reset (por='00011xxx' mclr='000qquuu')
        bit (names='IRP RP nTO nPD Z DC C' width='1 2 1 1 1 1 1')
    sfr (key=FSR addr=0x4 size=1 access='rw rw rw rw rw rw rw rw')
        reset (por='xxxxxxxx' mclr='uuuuuuuu')
        bit (names='FSR' width='8')
        stimulus (scl=rwb pcfiles=rw regfiles=w type=int)
    sfr (key=PORTA addr=0x5 size=1 access='u u rw rw rw rw rw rw')
        reset (por='--xxxxxx' mclr='--uuuuuu')
        bit (names='- - RA5 RA4 RA3 RA2 RA1 RA0' width='1 1 1 1 1 1 1 1')
        bit (tag=scl names='RA' width='8')
        stimulus (scl=rwb pcfiles=rw regfiles=rw)
    UnusedRegs (0x6-0x6)
    sfr (key=PORTC addr=0x7 size=1 access='u u rw rw rw rw rw rw')
        reset (por='--xxxxxx' mclr='--uuuuuu')
        bit (names='- - RC5 RC4 RC3 RC2 RC1 RC0' width='1 1 1 1 1 1 1 1')
        bit (tag=scl names='RC' width='8')
        stimulus (scl=rwb pcfiles=rw regfiles=rw)
    UnusedRegs (0x8-0x9)
    sfr (key=PCLATH addr=0xa size=1 access='u u u rw rw rw rw rw')
        reset (por='---00000' mclr='---00000')
        bit (names='- - - PCLATH' width='1 1 1 5')
        stimulus (scl=rwb pcfiles=rw regfiles=w type=int)
    sfr (key=INTCON addr=0xb size=1 access='rw rw rw rw rw rw rw rw')
        reset (por='00000000' mclr='0000000u')
        bit (names='GIE PEIE TMR0IE INTE RAIE TMR0IF INTF RAIF' width='1 1 1 1 1 1 1 1')
        stimulus (scl=rwb pcfiles=rw regfiles=w)
    sfr (key=PIR1 addr=0xc size=1 access='rw rw u u rw u u rw')
        reset (por='00--0--0' mclr='00--0--0')
        bit (names='EEIF ADIF - - CMIF - - TMR1IF' width='1 1 1 1 1 1 1 1')
        stimulus (scl=rwb pcfiles=rw regfiles=w)
    UnusedRegs (0xd-0xd)
    sfr (key=TMR1 addr=0xe size=2 flags=j)
        bit (names='TMR1' width='16')
        stimulus (scl=rwb regfiles=w type=int)
    sfr (key=TMR1L addr=0xe size=1 access='rw rw rw rw rw rw rw rw')
        reset (por='xxxxxxxx' mclr='uuuuuuuu')
        bit (names='TMR1L' width='8')
        stimulus (scl=rwb pcfiles=w regfiles=w type=int)
    sfr (key=TMR1H addr=0xf size=1 access='rw rw rw rw rw rw rw rw')
        reset (por='xxxxxxxx' mclr='uuuuuuuu')
        bit (names='TMR1H' width='8')
        stimulus (scl=rwb pcfiles=w regfiles=w type=int)
    sfr (key=T1CON addr=0x10 size=1 access='u rw rw rw rw rw rw rw')
        reset (por='-0000000' mclr='-uuuuuuu')
        bit (names='- TMR1GE T1CKPS T1OSCEN nT1SYNC TMR1CS TMR1ON' width='1 1 2 1 1 1 1')
        stimulus (scl=rwb regfiles=w)
    UnusedRegs (0x11-0x18)
    sfr (key=CMCON addr=0x19 size=1 access='u r u rw rw rw rw rw')
        reset (por='-0-00000' mclr='-0-00000')
        bit (names='- COUT - CINV CIS CM' width='1 1 1 1 1 3')
        stimulus (scl=rwb regfiles=w)
    UnusedRegs (0x1a-0x1d)
    sfr (key=ADRESH addr=0x1e size=1 access='rw rw rw rw rw rw rw rw')
        reset (por='xxxxxxxx' mclr='uuuuuuuu')
        bit (names='ADRESH' width='8')
        stimulus (scl=rwb type=int)
    sfr (key=ADCON0 addr=0x1f size=1 access='rw rw u rw rw rw rw rw')
        reset (por='00-00000' mclr='00-00000')
        bit (names='ADFM VCFG - CHS GO/nDONE ADON' width='1 1 1 3 1 1')
        bit (tag=scl names='ADFM VCFG - CHS GO_nDONE ADON' width='1 1 1 3 1 1')
        stimulus (scl=rwb regfiles=w)
    sfr (key=OPTION_REG addr=0x81 size=1 access='rw rw rw rw rw rw rw rw')
        reset (por='11111111' mclr='11111111')
        bit (names='nRAPU INTEDG T0CS T0SE PSA PS' width='1 1 1 1 1 3')
        stimulus (scl=rwb regfiles=w)
    sfr (key=TRISA addr=0x85 size=1 access='u u rw rw r rw rw rw')
        reset (por='--111111' mclr='--111111')
        bit (names='- - TRISA5 TRISA4 TRISA3 TRISA2 TRISA1 TRISA0' width='1 1 1 1 1 1 1 1')
        bit (tag=scl names='TRISA' width='8')
        stimulus (scl=rwb regfiles=w)
    UnusedRegs (0x86-0x86)
    sfr (key=TRISC addr=0x87 size=1 access='u u rw rw rw rw rw rw')
        reset (por='--111111' mclr='--111111')
        bit (names='- - TRISC5 TRISC4 TRISC3 TRISC2 TRISC1 TRISC0' width='1 1 1 1 1 1 1 1')
        bit (tag=scl names='TRISC' width='8')
        stimulus (scl=rwb regfiles=w)
    UnusedRegs (0x88-0x89)
    sfr (key=PIE1 addr=0x8c size=1 access='rw rw u u rw u u rw')
        reset (por='00--0--0' mclr='00--0--0')
        bit (names='EEIE ADIE - - CMIE - - TMR1IE' width='1 1 1 1 1 1 1 1')
        stimulus (scl=rwb pcfiles=rw regfiles=w)
    UnusedRegs (0x8d-0x8d)
    sfr (key=PCON addr=0x8e size=1 access='u u u u u u rw rw')
        reset (por='------0x' mclr='------uu')
        bit (names='- - - - - - nPOR nBOR' width='1 1 1 1 1 1 1 1')
        stimulus (scl=rwb regfiles=w)
    UnusedRegs (0x8f-0x8f)
    sfr (key=OSCCAL addr=0x90 size=1 access='rw rw rw rw rw rw u u')
        reset (por='100000--' mclr='100000--')
        bit (names='CAL - -' width='6 1 1')
        stimulus (scl=rwb regfiles=w)
    sfr (key=ANSEL addr=0x91 size=1 access='rw rw rw rw rw rw rw rw')
        reset (por='11111111' mclr='11111111')
        bit (names='ANS7 ANS6 ANS5 ANS4 ANS3 ANS2 ANS1 ANS0' width='1 1 1 1 1 1 1 1')
        stimulus (scl=rwb regfiles=r)
    UnusedRegs (0x92-0x94)
    sfr (key=WPUA addr=0x95 size=1 access='u u rw rw u rw rw rw')
        reset (por='--11-111' mclr='--11-111')
        bit (names='- - WPUA5 WPUA4 - WPUA2 WPUA1 WPUA0' width='1 1 1 1 1 1 1 1')
        stimulus (scl=rwb regfiles=w)
    sfr (key=IOCA addr=0x96 size=1 access='u u rw rw rw rw rw rw')
        reset (por='--000000' mclr='--000000')
        bit (names='- - IOCA5 IOCA4 IOCA3 IOCA2 IOCA1 IOCA0' width='1 1 1 1 1 1 1 1')
        stimulus (scl=rwb regfiles=w)
    UnusedRegs (0x97-0x98)
    sfr (key=VRCON addr=0x99 size=1 access='rw u rw u rw rw rw rw')
        reset (por='0-0-0000' mclr='0-0-0000')
        bit (names='VREN - VRR - VR' width='1 1 1 1 4')
        stimulus (scl=rwb regfiles=w)
    sfr (key=EEDAT addr=0x9a size=1 access='rw rw rw rw rw rw rw rw')
        reset (por='00000000' mclr='00000000')
        bit (names='EEDAT' width='8')
        stimulus (scl=rwb pcfiles=rw regfiles=rw)
    sfr (key=EEADR addr=0x9b size=1 access='u rw rw rw rw rw rw rw')
        reset (por='-0000000' mclr='-0000000')
        bit (names='- EEADR' width='1 7')
        stimulus (scl=rwb pcfiles=rw regfiles=w)
    sfr (key=EECON1 addr=0x9c size=1 access='u u u u rw rw rs rs')
        reset (por='----x000' mclr='----q000')
        bit (names='- - - - WRERR WREN WR RD' width='1 1 1 1 1 1 1 1')
        stimulus (scl=rwb pcfiles=rw regfiles=w)
    sfr (key=EECON2 addr=0x9d size=1 access='w w w w w w w w')
        reset (por='--------' mclr='--------')
        bit (names='EECON2' width='8')
    sfr (key=ADRESL addr=0x9e size=1 access='rw rw rw rw rw rw rw rw')
        reset (por='xxxxxxxx' mclr='uuuuuuuu')
        bit (names='ADRESL' width='8')
        stimulus (scl=rwb regfiles=r type=int)
    sfr (key=ADCON1 addr=0x9f size=1 access='u rw rw rw u u u u')
        reset (por='-000----' mclr='-000----')
        bit (names='- ADCS - - - -' width='1 3 1 1 1 1')
        stimulus (scl=rwb regfiles=w)
    
    ######################################################################
    #
    # Configuration Registers
    #
    ######################################################################
    
    cfgbits (key=CONFIG addr=0x2007 unused=0xe00)
        illegal (mask=0x48 value=0x48 msg="Current settings of PWRT and BOD are in conflict")
        field (key=OSC mask=0x7 desc="Oscillator")
            setting (req=0x7 value=0x7 desc="External RC Clockout")
            setting (req=0x7 value=0x6 desc="External RC No Clock")
            setting (req=0x7 value=0x5 desc="Internal RC Clockout")
            setting (req=0x7 value=0x4 desc="Internal RC No Clock")
            setting (req=0x7 value=0x3 desc="EC")
            setting (req=0x7 value=0x2 desc="HS")
            setting (req=0x7 value=0x1 desc="XT")
            setting (req=0x7 value=0x0 desc="LP")
        field (key=WDT mask=0x8 desc="Watchdog Timer")
            setting (req=0x8 value=0x8 desc="On")
            setting (req=0x8 value=0x0 desc="Off")
        field (key=PUT mask=0x10 desc="Power Up Timer")
            setting (req=0x10 value=0x10 desc="Off")
            setting (req=0x10 value=0x0 desc="On")
        field (key=MCLRE mask=0x20 desc="Master Clear Enable")
            setting (req=0x20 value=0x20 desc="External")
            setting (req=0x20 value=0x0 desc="Internal")
        field (key=BODEN mask=0x40 desc="Brown Out Detect")
            setting (req=0x40 value=0x40 desc="On")
            setting (req=0x40 value=0x0 desc="Off")
        field (key=CP mask=0x80 desc="Code Protect")
            setting (req=0x80 value=0x80 desc="Off")
                checksum (type=0x0 protregion=0x0-0x0)
            setting (req=0x80 value=0x0 desc="On")
                checksum (type=0x20 protregion=0x0-0x3fe)
        field (key=CPD mask=0x100 desc="Data EE Read Protect")
            setting (req=0x100 value=0x100 desc="Off")
            setting (req=0x100 value=0x0 desc="On")
        field (key=BG mask=0x3000 desc="Bandgap Calibration Bits" flags=xh)
            setting (req=0x3000 value=0x3000 desc="Adjust Bandgap Voltage (-100mV)")
            setting (req=0x3000 value=0x1000 desc="Target Bandgap Voltage (2.1V)")
            setting (req=0x3000 value=0x0 desc="Adjust Bandgap Voltage (100mv)")
    Last edited by ScaleRobotics; - 14th September 2010 at 14:55.
    http://www.scalerobotics.com

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts