+ Reply to Thread
Page 1 of 2
1 2 Last
Results 1 to 15 of 16

Thread: 16F628 projects?

  1. #1
    epilot Newbie
    Join Date
    Jul 2005
    Location
    middle east
    Posts
    486

    Default 16F628 projects?

    hi there after some of post about 16F84 PIC some of friends here invented me using from 16F628 and today i got a few but can not fond any circuit or project with them in the net!?
    does anyone know any link please?

    i will check tomorrow but before can someone please tell me if 16f628 pins are the same with 16f84? it seems they are not?

    thanks


  2. #2
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,794

    Default

    Check my tutorials, they use the 16F628 - the 16F628 is a direct pin for pin replacement for the 16F84 (or the even older 16C84).
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  3. #3
    epilot Newbie
    Join Date
    Jul 2005
    Location
    middle east
    Posts
    486

    Default

    Quote Originally Posted by Nigel Goodwin
    Check my tutorials, they use the 16F628 - the 16F628 is a direct pin for pin replacement for the 16F84 (or the even older 16C84).
    i have a program based 16F84 and i used 16F628 instead, the pic becames programmed with my pic programmer but it did not work on the circuit!

    which part of your tutorial? i cheked it but i could not find any project based 16f628!?

    thanks

  4. #4
    csaba911 Good csaba911 Good csaba911 Good
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    219

    Default

    1-7 &9,10
    I'm could be wrong many time's, at least I know what I'm doing.
    http://shop.ebay.ca/merchant/csaba911

  5. #5
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,794

    Default

    Quote Originally Posted by epilot
    Quote Originally Posted by Nigel Goodwin
    Check my tutorials, they use the 16F628 - the 16F628 is a direct pin for pin replacement for the 16F84 (or the even older 16C84).
    i have a program based 16F84 and i used 16F628 instead, the pic becames programmed with my pic programmer but it did not work on the circuit!
    You can't just use the same HEX file, you need to reasseble it for the 16F628, the migration document at MicroChip explains the simple steps required.

    [quote]

    which part of your tutorial? i cheked it but i could not find any project based 16f628!?
    /quote]

    See csaba911's post.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  6. #6
    epilot Newbie
    Join Date
    Jul 2005
    Location
    middle east
    Posts
    486

    Default

    [quote="Nigel Goodwin"]
    Quote Originally Posted by epilot
    Quote Originally Posted by Nigel Goodwin
    Check my tutorials, they use the 16F628 - the 16F628 is a direct pin for pin replacement for the 16F84 (or the even older 16C84).
    i have a program based 16F84 and i used 16F628 instead, the pic becames programmed with my pic programmer but it did not work on the circuit!
    You can't just use the same HEX file, you need to reasseble it for the 16F628, the migration document at MicroChip explains the simple steps required.


    which part of your tutorial? i cheked it but i could not find any project based 16f628!?
    /quote]

    See csaba911's post.

    oh thanks Nigel that was what i forgot although i dont know how i can make the Hex or ASM files reusable for 16f628 really?

  7. #7
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,794

    Default

    Quote Originally Posted by epilot
    oh thanks Nigel that was what i forgot although i dont know how i can make the Hex or ASM files reusable for 16f628 really?
    You can't (easily) alter the HEX files, but it's simple to alter the ASM file and reassemble it - you need to change the GPR start address (0x0C for 16F84 and 0x20 for 16F628), you need to add two lines turning off the comparator module (see my tutorials which all do this), and alter the config fuse settings to be as you want them - not forgetting to change the processor and include names at the top of the assembler file. Then assemble the code, this produces a 16F628 compatible HEX file.

    If you've got a short program, then post it (using the CODE button to keep it formatted correctly), and I'll post it back with the required mods.

    It's really VERY easy!.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  8. #8
    epilot Newbie
    Join Date
    Jul 2005
    Location
    middle east
    Posts
    486

    Default

    Quote Originally Posted by Nigel Goodwin
    Quote Originally Posted by epilot
    oh thanks Nigel that was what i forgot although i dont know how i can make the Hex or ASM files reusable for 16f628 really?
    You can't (easily) alter the HEX files, but it's simple to alter the ASM file and reassemble it - you need to change the GPR start address (0x0C for 16F84 and 0x20 for 16F628), you need to add two lines turning off the comparator module (see my tutorials which all do this), and alter the config fuse settings to be as you want them - not forgetting to change the processor and include names at the top of the assembler file. Then assemble the code, this produces a 16F628 compatible HEX file.

    If you've got a short program, then post it (using the CODE button to keep it formatted correctly), and I'll post it back with the required mods.


    It's really VERY easy!.
    thanks Nigel i'll try it and if i had a peroblem then let you know

    thanks alot again

  9. #9
    sweetadam Newbie
    Join Date
    Feb 2007
    Posts
    1

    Unhappy Plz Help Me

    hi everyone

    i waz wondering irf anyone could help me with configration,and connection pins of the pc 1602-h LCD communicating with PIC16f628

    here are the links for both data sheets:
    LCD:http://www.powertipusa.com/pdf/pc1602h.pdf
    PIC:http://www.microchip.com/stellent/id...cName=en010209


    thank you

  10. #10
    @rt
    @rt is offline
    @rt Newbie
    Join Date
    Apr 2008
    Posts
    4

    Default

    Hi Guys, First time here
    I completed this project a few years ago:
    http://www.freewebs.com/defxev/player.htm
    based on the btc sound algo by Roman Black, but considerable work of my own
    went into the project, as speed/playback control was implemented, and there
    weren't any methods to load the EEPROM at the time, and I had to write a conversion
    program of my own. This was done with a 16f84A, but years later,
    I'm having trouble porting it fro the 16f628, or even understanding it at all after
    a couple of years programming with C.

    I was hoping to use the internal clock of the 16f628, and have a talking
    greeting card ready in time for Mother's Day!
    Any help with this would be greatly appreciated.
    Cheers,Art.
    Attached Files

  11. #11
    @rt
    @rt is offline
    @rt Newbie
    Join Date
    Apr 2008
    Posts
    4

    Default

    No takers? I thought it was supposed to be dead easy?

    I've tried pasting the 16f628 include file right at the top of my program,
    and setting CMCON to 0x07, which is all that I thought the migration involved,
    but the generated compiler errors are huge.

    Any tips on what I'm not doing?
    This source compiles and runs fine for 16f84A.
    The frustrating thing is that I've written other programs for the 16f628 that work fine,
    it's just been so long since I've touched them. This would probably have been a snap
    a couple of years ago.

  12. #12
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,709
    Blog Entries
    5

    Default

    Well you have to change portb to PORTB and the RAM starts at 0x20 on the 16F628
    Bill
    Smart Kits build Smart People

    http://www.blueroomelectronics.com/

  13. #13
    @rt
    @rt is offline
    @rt Newbie
    Join Date
    Apr 2008
    Posts
    4

    Default

    Thanks, I've already gotten it working
    Once i turned off case sensitivity in the project, the only errors were
    bad RAM addresses, and I soon figured it out from the datasheet.
    Great that you replied though.

    Now I can lower the part count by using internal clock,
    internal pullup resistors, and disable MCLR to save another resistor.
    Pretty crucial when trying to fit it in a greeting card.
    Cheers, Art.

  14. #14
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,709
    Blog Entries
    5

    Default

    Good luck, be careful with MCLR & INTOSC, some programmers can't get the chip back into programming mode when those are set.
    Bill
    Smart Kits build Smart People

    http://www.blueroomelectronics.com/

  15. #15
    Banned donniedj Bad donniedj Bad
    Join Date
    Jan 2004
    Location
    So Cal
    Posts
    337

    Default

    This is a nice project. I too used that BTC application. What I did different was to use the program flash memory of the, yes its me and my 24F again, 24F family. This way I got rid of the external EEPROM, its price, its slow speed, and its volume consumption Made my own vb app to read from the BTC output of retlw 'xxxxxxxx' and convert them to a series of .pword 0x000000 for the 24F family. The resulting file is included in the MPLAB project as an include so that every time I hit build, the micro would automatically be burned with the 1-bit encoding sound fresh out the oven.

    So tell me, how do the asterisks in the words "f**cking" sound, like bleep bleep?

+ Reply to Thread
Page 1 of 2
1 2 Last

Tags for this Thread