A header wizard - Page 4


Closed Thread
Page 4 of 6 FirstFirst 123456 LastLast
Results 121 to 160 of 230

Thread: A header wizard

  1. #121
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,619


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by prstein View Post
    Hello All,

    A screenshot is attached.

    Best Regards,
    Paul
    Hi, Paul

    Nice one !!! I take it all ...

    Alain

    PS: Place PORTA = xxxx .... BEFORE TRISA = xxx ... to prevent any port toggling .
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #122
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    That looks nice!!!
    Next ADC?
    Thanks Dave! ADC setup sounds like a good next step.

    Best Regards,
    Paul

  3. #123
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cncmachineguy View Post
    Question for the masses, Do you think we should still include the config bits? I feel like it would still be good to have, plus its all wrapped up in 1 spot. And sometime down the road, we may want it to make some simple error checking like : configed for 4mHz internal osc, but wanting to rum 115KB serial, or something like that.
    At minimum the Wizard will need to know the OSC speeds. But we may not have to worry about all of the configs.
    Dave
    Always wear safety glasses while programming.

  4. #124
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cncmachineguy View Post
    Paul, its great! I assume if ADC or any other special function options are chosen, the corasponding pin will not be available for I/O configuration?
    Not sure how that will specifically be worked out. The app should make it so that the header will work that way. I think (but need to check) that if you set a particular TRIS direction it will be superseded by a subsequent ADC setup. But I could have this completely wrong...

    Quote Originally Posted by cncmachineguy View Post
    Question for the masses, Do you think we should still include the config bits? I feel like it would still be good to have, plus its all wrapped up in 1 spot. And sometime down the road, we may want it to make some simple error checking like : configed for 4mHz internal osc, but wanting to rum 115KB serial, or something like that.
    I've removed the fuse bits parsing but I haven't thrown it away. I currently plan to see what the new mystery application will do, first. It could just 100% outclass anything I can do.

    I do think it will be possible to do some sort of "reality check" on the selected configuration to catch circumstances such as that you mention. I would probably put a remmed warning or suggestion into the header text.

    Thanks for the comments!

    Best Regards,
    Paul

  5. #125
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Nice one !!! I take it all ...

    PS: Place PORTA = xxxx .... BEFORE TRISA = xxx ... to prevent any port toggling .
    Hello Alain,

    Thank you! And I appreciate the reminder about PORTx before TRISx. It seems I usually default to alphabetical...

    Best Regards,
    Paul

  6. #126
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default First Alpha Version

    Attached is the first Alpha version of my attempt at a PBP Header wizard. Please try it out if you are interested and/or have been following this thread. However, expect bugs.

    I'm happy to provide the source code (in Delphi, version 4) on request but unless you really want to dig in I suggest waiting until it is a little more stable and structured.

    Any comments, suggestion, requests, and bug reports are welcome.

    Best Regards,
    Paul
    Attached Files Attached Files

  7. #127
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    1st praise - excellent so far
    2nd requests
    - instead of just giving me an error when mpasm cant be found, can it bring up a file dialog to find it?
    - can we have a browse button to get the path to mpasm?
    - after setting the path, reload to populate. (now it requires exit and restart)
    - request or bug, depends on you. can't type a part number in direct. error right away. (file not found)

    3rd bugs
    - so far all I see is tris sets the port, and initial state sets tris. port g on 16f1947 tris and portl are correct. only 5 pins for G, maybe thats it?
    - tried it with a 16f676, device has 12 I/O a0..5 and c0..5 wizard configures for 8 and 8. gets the names correct.
    - initially on startup, "select device" text is not there. if I max the window, its there.


    Overall awesome! Looking forward to more!
    Last edited by cncmachineguy; - 14th September 2010 at 06:02.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  8. #128
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    PROBLEM...

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

    I can not find where the ports are defined.
    Where does it tell that the 16F676 only has six pins on a port?

    Evidently the data sheet is the only place to find the info.
    HIGH PORTC.7
    compiles just fine for a 16F676.
    Dave
    Always wear safety glasses while programming.

  9. #129
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Maybe it's not so much a problem as a limitation. If the info is not available in the .inc, that's just one of the things the programmer will still have to rtfd for. The only other choice would be to build in an editor and custom make a new .inc so to speak.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  10. #130
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,980


    Did you find this post helpful? Yes | No

    Default

    Hi Paul.

    I likd the idea of the Initial state.

    Great job!

    Is this in VB?
    Ioannis

  11. #131
    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 15:55.
    http://www.scalerobotics.com

  12. #132
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    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.

    I can not find where the ports are defined.
    Where does it tell that the 16F676 only has six pins on a port?

    Evidently the data sheet is the only place to find the info.
    HIGH PORTC.7
    compiles just fine for a 16F676.
    Hi Dave,

    It fooled me too. I've now been through ALL of the files (PBP, MPASM, and Proton) and see no way to glean the individual port bits that don't exist. So I've found the right spot in the code to toss in exceptions to the general rules. Now, if the part name is "16F676" or "16F630", it will show only PORTA and PORTC with bits 0-5 enabled. As additional problem children are identified I can keep adding the special handling for them there.

    I'll have a new version posted sometime today.

    With regard to the ADC settings, I remain woefully short in the imagination department. Could someone please post what items you would like to select for setting up the ADC, then show me an example of what the output should look like? That would be a big help...

    Best Regards,
    Paul

  13. #133
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cncmachineguy View Post
    1st praise - excellent so far
    2nd requests
    - instead of just giving me an error when mpasm cant be found, can it bring up a file dialog to find it?
    - can we have a browse button to get the path to mpasm?
    - after setting the path, reload to populate. (now it requires exit and restart)
    - request or bug, depends on you. can't type a part number in direct. error right away. (file not found)

    3rd bugs
    - so far all I see is tris sets the port, and initial state sets tris. port g on 16f1947 tris and portl are correct. only 5 pins for G, maybe thats it?
    - tried it with a 16f676, device has 12 I/O a0..5 and c0..5 wizard configures for 8 and 8. gets the names correct.
    - initially on startup, "select device" text is not there. if I max the window, its there.


    Overall awesome! Looking forward to more!
    Hello Bert,

    Thanks much for the comments. I'm working on Items 2 and 3, hope to have the next rev sometime today.

    Best Regards,
    Paul

  14. #134
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    Hi Paul.

    I likd the idea of the Initial state.

    Great job!

    Is this in VB?
    Ioannis
    Hello Ioannis,

    Thank you very much! It is written in Delphi, an IDE for Visual Pascal. I'm using version 4, which is kind of old, but the IDE loads so much more quickly than the later releases. I know about a half dozen or so (programming) languages, several of those are different flavors of C/C++. I can stumble through a couple of others (C# and Java). I tell customers that I'll write in any language they pay me to. If it isn't specified and it's for Windows, I generally choose Delphi.

    I better get off my soapbox before I blather on any further...8-)

    Best Regards,
    Paul

  15. #135
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default @ scalerobotics

    Thanks for the great info and the links! I think I'd prefer to keep the idea of using those files as plan B, as it takes away the simplicity by requiring files to be present that are not required by PBP.

    An alternate Plan B would be to develop my/our own set of files with just the data the application needed. A lot of work on the front side but there could be benefits as well.

    Best Regards,
    Paul

  16. #136
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by prstein View Post
    Thanks for the great info and the links! I think I'd prefer to keep the idea of using those files as plan B, as it takes away the simplicity by requiring files to be present that are not required by PBP.
    But if they are freely available, they could be distrubted with the program. Are the installed with mplab? if so it seems no different then requiring MPASM

    An alternate Plan B would be to develop my/our own set of files with just the data the application needed. A lot of work on the front side but there could be benefits as well.
    This goes back to the original database idea of Dave. Use a form to input information for each device as needed. If the db is community supported, it will be far easier to build the records.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  17. #137
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,980


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cncmachineguy View Post
    But if they are freely available, they could be distrubted with the program. Are the installed with mplab? if so it seems no different then requiring MPASM



    This goes back to the original database idea of Dave. Use a form to input information for each device as needed. If the db is community supported, it will be far easier to build the records.
    Hmm, until Mama Microchip thinks there are rights on this and prohibits the free use of the files...

    OK, may be I am pessimistic about it but if it involves community use of their original files, i'd be carefull...

    Now it came to me, what is Lester doing on the matter of domain name?

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default

    The *.dev files come with MpLab IDE. I believe the only way to get Mpasm is to download the Mplab IDE. So, everyone that selects Mpasm should have one version or another of Mplab Ide, and the associated files. There are also some other usefull (depending on how complex you want to go) info. This area has pin # information: C:\Program Files\Microchip\MPLAB IDE\VDI\XML\PIC16 . Images could be "mapped" to show labels for pins, etc. Images are here: C:\Program Files\Microchip\MPLAB IDE\VDI\Images

    I guess it is both good and bad to have it dependent on Microchip. If they end support, then your work needs to be re-worked. However, the updates being dependent on what mpasm has to work with seems like a good idea. You immediately see if the mplab ide version you have does not support your chip, does not require programmer intervention to add chips. But of course there are many ways to do it, all with advantages, and disadvantages.

    Walter
    Last edited by ScaleRobotics; - 14th September 2010 at 17:38.
    http://www.scalerobotics.com

  19. #139
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Back when I played with VDI, I thought I had found a goldmine for pic setup. I was sad to discover they didn't support 16f818 or 16f676. I then figured out it just didn't support smaller chips. It seemed it was developed to help with larger more powerful stuff.

    That said, its nice to know there is still support stuff shipping with mplab. I would be concerned how long that will continue. Like when the install won't fit on a CD anymore, what will they chop to squeeze in on.

    As for general support of MPLAB, I can't imagine they would stop that. After all, thats what allows new customers to try their product out, and allows the seasoned vets to continue. Not to mention, all the third party folks who depend on it.

    Now if the *.dev files are only required for VDI, then maybe they will cease at some point. But my vote is, for now, we take full advantage of what they offer.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  20. #140
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I use this when I do ASM on Linux.
    http://piklab.sourceforge.net/index.php
    I do not see where it uses the *.dev files but it does use the *.inc files. Maybe MicroChip does not care? As long as we give credit where do.

    I suppose when MicroChip quits supporting the files and/or does not like what we are doing it will be time to move on to another chip.
    Dave
    Always wear safety glasses while programming.

  21. #141
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    MicrChips EULA, Part of. What do you all think it really means?

    (a) Subject to all of the terms of this Agreement, Company grants Licensee a personal, worldwide, non-exclusive, non-sublicensable, non-transferable limited license to use and modify the Software solely for use with Company products (“Company Products”).

    Licensee may not modify, create derivatives or reverse engineer (by disassembly, decompilation, translation, or otherwise) Software and may not copy or reproduce all or any portion of Software, except to the extent that such activity is specifically allowed by this Agreement or expressly permitted by applicable law notwithstanding the foregoing limitations.
    Dave
    Always wear safety glasses while programming.

  22. #142
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    MicrChips EULA, Part of. What do you all think it really means?
    Well I'm no lawyer to be sure. I am certain of one thing, it is vague enough to mean whatever their lawyers imagination needs it to mean.

    Having said that, I take the first line to mean we are not allowed to use MPLAB to program any other uP's. The vagueness comes into play where the software or any data files may also be considered "company products". But we ARE using it to program THEIR products. AND we are not offering it for sale.

    I don't believe we are doing any of the second statement unless we package copies of the inc's, dev's, ... with our wizard. So this brings me to the question of the web based app, can we have it look at the data on our local drive? That way we don't have to upload the files to the server, thus not violating the aggrement.

    I agree with the post way back about the license, we need one, if for nothing else but to state the microchip files may not be copied.

    Personally I am a wait and see kind of guy. As such, I don't believe we are infringing on the license. This may be one of those areas where they don't care, but if we push them to make a decision, they will decide we can't use them to avoid any further problems. We are after all, creating something to promote the sale of more PIC's. This wizard will in no way have a negitave impact on them or their product.

    Now I suppose if someone wanted to, the wizards could be modified to work for other brands, but at that point the microchip files will be of no use to them.

    Just my $.02.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  23. #143
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    I suppose when MicroChip quits supporting the files and/or does not like what we are doing it will be time to move on to another chip.
    AMEN! I couldn't agree more!
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    I use this when I do ASM on Linux.
    http://piklab.sourceforge.net/index.php
    I do not see where it uses the *.dev files but it does use the *.inc files. Maybe MicroChip does not care? As long as we give credit where do.
    Hey Dave,
    How do you get mpasm (or do you) on to linux? Are you using WINE?
    I do not see the .inc files included here: http://packages.debian.org/lenny/i386/piklab/filelist Just wondering if you have the device files on your linux machine.

    I did a little searching, and I could not find PBP setup instructions for Linux. (I hear a new Wiki calling your name......)

    Anyway, I assume (in Microsoft environments) the .dev files are used in the SIM part of the IDE. But it looks like it is also used for some programmers, as it contains program voltages etc. It might be used for other features inside the IDE as well. I can't really see Microchip dropping the sim feature, so I think the Device files are pretty safe. The more info we can feed the wizard, the more we could make it do.
    http://www.scalerobotics.com

  25. #145
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default PBP Header Wizard v0.1 build 2

    Hi All,

    Added a version history in the zip file. Changes additions this time include:
    -Added special handling for 16F676 and 16F630 PORTs and TRISs.
    -Added a directory list box for use in selecting MPASM folder.
    -Re-loads PIC combo box after changing MPASM folder in Settings window.
    -Responds better to inaccurate folder settings.

    cncmachineguy, couldn't do much about typing in the combo box this time around.

    I could really use some direction on implementing the ADC setup. An example or two would be exceedingly helpful...

    Best Regards,
    Paul
    Attached Files Attached Files

  26. #146
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Paul,

    I will play with this when I get home tonight, Actually have to WORK at work today.

    As for the ADC part, I see it as this:

    new tab or button to bring up that function. same as port state is now.
    choose how many channels and which one(s). That will also drive whether I/O is avail for that pin
    Choose Vref options.
    Choose 8 or 10 bit and right or left justified.
    Stuff I forgot
    set registers to corespond to choices
    Last edited by cncmachineguy; - 15th September 2010 at 16:56. Reason: typos
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  27. #147
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cncmachineguy View Post
    I will play with this when I get home tonight, Actually have to WORK at work today.
    I always get my best work done when I'm supposed to be doing something else.

    As for the ADC part, I see it as this:

    new tab or button to bring up that function. same as port state is now.
    choose how many channels and which one(s). That will also drive whether I/O is avail for that pin
    Choose Vref options.
    Choose 8 or 10 bit and right or left justified.
    Stuff I forgot
    set registers to corespond to choices
    Yeah, it's that next-to-the-last one that's tough to implement...see the attached screenshot.

    Sorry, couldn't resist the joke...8^)

    Best Regards,
    Paul
    Attached Images Attached Images  

  28. #148
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by prstein View Post
    Sorry, couldn't resist the joke...8^)

    Best Regards,
    Paul
    ROTFLMAO!!!!!!!!! I love it. I vote leave it in, then see how many users scratch their head.

    If you can get that to work, it will be a "true" wizard!!
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  29. #149
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Still laughing.

    Ok, more serious thought. Maybe give an option to set a variable name for the results?

    Guess I will have to pull up a data sheet to see what I forgot.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  30. #150
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,980


    Did you find this post helpful? Yes | No

    Default

    I am struggling with Interrupt on Change this afternoon and cannot figure whats wrong ...

    Now this would be the ultimate wizard.

    Prepare the settings for the DT-INTs too!

    Ioannis

  31. #151
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post

    Prepare the settings for the DT-INTs too!

    Ioannis
    This would be a great addition, provided DT is good with it.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  32. #152
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    Now this would be the ultimate wizard.
    Prepare the settings for the DT-INTs too!
    Quote Originally Posted by cncmachineguy View Post
    This would be a great addition, provided DT is good with it.
    Absolutely, sounds like a great idea!
    Go for it.
    DT

  33. #153
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Absolutely, sounds like a great idea!
    Go for it.
    Great - Thanks Darrel!

    @ Paul, this is direct from the 16f1947 datasheet:

    When configuring and using the ADC the following
    functions must be considered:
    • Port configuration
    • Channel selection
    • ADC voltage reference selection
    • ADC conversion clock source
    • Interrupt control
    • Result formatting


    Maybe that helps to get the stuff I forgot? As an FYI there are 17 available channels for this device. Not counting the temp sense, DAC, and FVR. for a total of 20. (last 3 are internal)

    Maybe also assign a variable to start conversion?
    Last edited by cncmachineguy; - 15th September 2010 at 22:21.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  34. #154
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    How do you get mpasm (or do you) on to linux? Are you using WINE?
    WINE yes. See the site in my signature. I did not wiki it because I did not know if there would be much interest.

    Paul,
    Here is a sample or three for headers with ADC
    Code:
    '16F88 ADC TEST  FORCHANNEL 0
        DEFINE OSC 4           
        OSCCON = %01100000
        @ __config _CONFIG1, _INTRC_IO & _WDT_OFF & _LVP_OFF & _MCLR_OFF &_CP_OFF
        ANSEL = %00001111
        TRISA = %11111111
    Code:
    '16F676 ADC ON PICKIT_1   
      DEFINE OSC 4
      @ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF     
      ANSEL = %00000001 'CHANNEL AN0  
      ADCON1 = %00010000 'FOSC/8 
      TRISA = %00000001 
      CMCON = %00000111
    Code:
     '18F4320      ADC_FTP iChip
        @ __CONFIG    _CONFIG1H, _HSPLL_OSC_1H
        @ __CONFIG    _CONFIG2H, _WDT_OFF_2H & _WDTPS_512_2H
        @ __CONFIG    _CONFIG4L, _LVP_OFF_4L
        DEFINE OSC 16
        INTCON.5 = 1    
        T0CON = %10000101 
        ON INTERRUPT GOTO TLOOP
        ADCON1 = %00001110
    Thanks Darrel!!!
    Dave
    Always wear safety glasses while programming.

  35. #155
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Thank you Dave (and Bert). I might take tonight off however...

    Darrel T: Can I include your "All Digital" as well?

    No promises on the DT Instant Interrupts configurator. Guess I'm the last PBP guy who hasn't used it! I'll add it to the list.

    Best Regards,
    Paul

  36. #156
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I might take tonight off however...
    You can not... You are the only one working
    Dave
    Always wear safety glasses while programming.

  37. #157
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by prstein View Post
    Darrel T: Can I include your "All Digital" as well?
    There's really nothing to configure with AllDigital.pbp
    It's either included or not.

    I guess you could add a single checkbox.

    Added: And maybe another checkbox for DEFINE SHOWDIGITAL 1

     
    Last edited by Darrel Taylor; - 16th September 2010 at 02:37. Reason: added
    DT

  38. #158
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by prstein View Post
    Guess I'm the last PBP guy who hasn't used it!

    Best Regards,
    Paul
    HAHA, don't feel like the lone ranger. All I've done is read all about them.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  39. #159
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    And maybe another checkbox for DEFINE SHOWDIGITAL 1 
    Hello Darrel,

    That was similar to what I had in mind. With permission, I'd put a copy of ALLDIGITAL in the installation folder and when the "All Ports Digital" checkbox was checked it would add

    include "[PBPHW Install directory]\alldigital.pbp"

    Of course I could also just parse the stuff myself but that's extra work...8^)

    Best Regards,
    Paul

  40. #160
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I will say having the include lines for "alldigital" and "instants" would be OK. But leave the actual files upto the user to get from Darrel's site. That way the Wizard will not have to worry about upgrades. Maybe have comments added to the header with the URL to Darrel's repository if they are used???
    Dave
    Always wear safety glasses while programming.

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