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
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)
1 Attachment(s)
Re: 16F84 to 16F648A program converter
Quote:
Originally Posted by
Archangel
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.
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
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
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
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.
Quote:
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!
Re: 16F84 to 16F648A program converter
Quote:
Originally Posted by
Art
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.
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.
Re: 16F84 to 16F648A program converter
Quote:
Originally Posted by
Art
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.
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.
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.
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
Re: 16F84 to 16F648A program converter
Thanks for your patience Art.
Camerart.
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?