16F84 to 16F648A program converter


Closed Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Jan 2013
    Posts
    64

    Default 16F84 to 16F648A program converter

    Hi All,

    My first post.

    I want to make a morse decoder, that will change radio morse signals to a display screen, also a a second one where I can type a letter and convert to morse for sending via radio.

    I have circuits and programs that use 16F84 chips (which I have), but setting the programming programs on the computer is proving a bit difficult, and I would rather use 16F648A or 16F819 chips, as I can program them, and am set-up for them.

    If anyone can help I would appreciate it.

    Cheers, Camerart

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: 16F84 to 16F648A program converter

    Hi camerart,
    add cmcon = 7 into the top area of your code. Should be all you need to change as the 16F648 has analog comparators and the 16F84 does not. (working' from memory here)
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Jan 2013
    Posts
    64


    Did you find this post helpful? Yes | No

    Default Re: 16F84 to 16F648A program converter

    Quote Originally Posted by Archangel View Post
    Hi camerart,
    add cmcon = 7 into the top area of your code. Should be all you need to change as the 16F648 has analog comparators and the 16F84 does not. (working' from memory here)
    Hi Archangel,

    Thanks. When I said I have the programs, I meant programs for the 16F84. I have attached one. I need to either study and understand it, or convert it somehow to PIC basic for 16F648A. Quite a task, especially from memory

    Cheers, Camerart.
    Attached Files Attached Files

  4. #4
    Join Date
    Oct 2011
    Posts
    54


    Did you find this post helpful? Yes | No

    Default Re: 16F84 to 16F648A program converter

    Hi camerart

    Have a look at Nigel Goodwins WinPicProg PIC Tutorial http://www.winpicprog.co.uk/pic_tutorial.htm
    Tutorial 1 shows how to turn off comparators and make PIC like a 16F84

    movlw 0x07
    movwf CMCON ;turn comparators off (make it like a 16F84)

    Phil

  5. #5
    Join Date
    Jan 2013
    Posts
    64


    Did you find this post helpful? Yes | No

    Default Re: 16F84 to 16F648A program converter

    Hi Phil,

    Thanks, I had a look, but I prefer in this case if someone can decode the program I attached, which is already proven, and goes straight into the circuit. I don't want to have to do R and D.

    Camerart.


    Quote Originally Posted by Sherbrook View Post
    Hi camerart

    Have a look at Nigel Goodwins WinPicProg PIC Tutorial http://www.winpicprog.co.uk/pic_tutorial.htm
    Tutorial 1 shows how to turn off comparators and make PIC like a 16F84

    movlw 0x07
    movwf CMCON ;turn comparators off (make it like a 16F84)

    Phil

  6. #6
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 16F84 to 16F648A program converter

    And again, add this to the source code you posted (after it's init label) :
    Code:
    movlw 0x07
    movwf CMCON
    Research and development is over! def works with 16F628/A.
    Don't know how you're going to get on when you come to actually having to do some.
    Quite a task, especially from memory
    Yes, adding two instructions of spoon fed code is much more difficult
    than porting an entire program from a low level language to a high level one!

  7. #7
    Join Date
    Jan 2013
    Posts
    64


    Did you find this post helpful? Yes | No

    Default Re: 16F84 to 16F648A program converter

    Quote Originally Posted by Art View Post
    And again, add this to the source code you posted (after it's init label) :
    Code:
    movlw 0x07
    movwf CMCON
    Research and development is over! def works with 16F628/A.
    Don't know how you're going to get on when you come to actually having to do some.

    Yes, adding two instructions of spoon fed code is much more difficult
    than porting an entire program from a low level language to a high level one!
    Hi ART,

    Do I detect a hint of sarcasm?

    Actually, my answers are after many years of trying to learn to be expert in PIC programming, but I'm afraid age has caught me up and it is really difficult for me.

    What you ( and previous messages) say is probably true and I'll try it.

    Thanks, Camerart.

  8. #8
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 16F84 to 16F648A program converter

    Of course.
    You can probably get the chip as a free sample, build the project with an 18 pin (or whatever) IC socket,
    and you have nothing to lose.

  9. #9
    Join Date
    Jan 2013
    Posts
    64


    Did you find this post helpful? Yes | No

    Default Re: 16F84 to 16F648A program converter

    Quote Originally Posted by Art View Post
    Of course.
    You can probably get the chip as a free sample, build the project with an 18 pin (or whatever) IC socket,
    and you have nothing to lose.
    Which chip? I have 16F84, but nothing to program them, and 16F648A with simulator, compiler and programmer.

    I looked at the code I posted in #3, and realised, I didn't pose the original question correctly. I don't know how to use this type of code, only Qbasic, I hoped for a Qbasic program from the code I posted, then I could understand and alter things if needed. With my system I write Qbasic and the simulator compiles it to .LST and .ASM and .HEX. The programmer uses the .HEX file to program. So even if I changed the code I posted, I then couldn't program it to the chip.

    I have PICSIMULATORIDE simulator and PICKIT 2 programmer.



    Cheers. Camerart.
    Last edited by camerart; - 26th May 2013 at 10:53.

  10. #10
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 16F84 to 16F648A program converter

    Microchip's RISC asm was free last I got it.
    That code should compile in the MPLAB development environment they provide for free.
    It's not a language you want to jump into straight up, but to insert two lines of code, yes.
    They also provide free sample chips from their site, and I think 16F628 is on the list
    so long as you can write to them.

  11. #11
    Join Date
    Jan 2013
    Posts
    64


    Did you find this post helpful? Yes | No

    Default Re: 16F84 to 16F648A program converter

    Ok, I will add it.

    I searched for init, but couldn't tell which one was the correct one, or do you mean at the beginning, under the 5 *****?

    Thanks, Camerart.

  12. #12
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: 16F84 to 16F648A program converter

    Straight after this:
    Code:
    init    movlw   0x04    ; divide XTAL OSC by 4 and then 32 for 4ms ticks
            option          ; later, load TMR0 with 256-140 and let overflow

  13. #13
    Join Date
    Jan 2013
    Posts
    64


    Did you find this post helpful? Yes | No

    Default Re: 16F84 to 16F648A program converter

    Thanks for your patience Art.

    Camerart.

  14. #14


    Did you find this post helpful? Yes | No

    Default Re: 16F84 to 16F648A program converter

    hi.please help me because i have a moving message display but i lost eeprom programe file so please you help me so i start it .i hope you help me?

Similar Threads

  1. Code doesn't work on 16F648A
    By Mr_Joe in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st September 2018, 23:09
  2. Problem with 16F648A
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th March 2008, 00:08
  3. Replies: 7
    Last Post: - 7th February 2008, 10:46
  4. 5x5 display 16f648a
    By nomad in forum Code Examples
    Replies: 6
    Last Post: - 26th December 2007, 05:03
  5. 16F648A Pin 0 and 1
    By Dwayne in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 9th June 2004, 17:25

Members who have read this thread : 1

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