Continue to Site

# convert from 16c84 to 16f628a need help

#### augustinetez

##### Active Member
Unfortunately, I'm now tied up until Sunday, so if nobody else has worked out what is going, I will be able to get back to it then.

Jaison - using the working 16F84 PIC you have, can you please give us an a list of what happens from the moment it is turned on.

Then we might be able to work out where in the '628 code it is going wrong.

#### Jaison

##### New Member
Unfortunately, I'm now tied up until Sunday, so if nobody else has worked out what is going, I will be able to get back to it then.

Jaison - using the working 16F84 PIC you have, can you please give us an a list of what happens from the moment it is turned on.

Then we might be able to work out where in the '628 code it is going wrong.
Good night everyone, Terry turning on the board he is on hold, activating the color (playing to negative) it activates the ptt signal (5 volts) and then releases the beep. If you enter DTMF commands it does other functions.

#### Jaison

##### New Member
I'm simulating on Proteus, the 16f84 is ok, the 16f628 is in a loop with the ptt activated and with a beep or CW on and off continuously.

#### Attachments

• Proteus 1.jpg
273.8 KB · Views: 67
• Proteus 2.png
233.9 KB · Views: 60

#### Pommie

##### Well-Known Member
Your second image is not the latest code that Terry posted as it doesn't have the BANKSEL code. It looks like the original 84 code.

Actually, that code needs to be changed to,
Code:
ReadEE
bsf     STATUS,RP0      ;select bank 1
movf    EEDATA,w        ;get EEDATA into w
bcf     STATUS,RP0      ;select bank 0
return
I'm guessing that the RP0 code was inserted by Ian and Terry didn't spot it.

Mike.

#### augustinetez

##### Active Member
I did update that with BANKSEL - the latest version of the file is in post #48 and also posted here.

#### Attachments

• rtp2022_628_4.asm
60.9 KB · Views: 52

#### Jaison

##### New Member
Terry with his last file, the program does not report an error but does not turn on the led or beep when I activate the COR. Previous versions up to 3 stay in the loop, 4 and 5 do not loop but do not turn on the leds in the simulator.

#### Attachments

• Proteus 4.jpg
280.1 KB · Views: 56

#### Pommie

##### Well-Known Member
Terry, that file still has,
Code:
;
; address is supplied in W on call, data is returned in w
;
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
bsf     STATUS,RP0      ;select bank 1
bcf     STATUS,RP0      ;select bank 0
movf    EEDATA,w        ;get EEDATA into w
;--------------------------------------------------------------------------------
BANKSEL    PORTA
;--------------------------------------------------------------------------------
return
Which is not going to work because EEDATA is in bank 1.

Mike.
Edit, I don't like BANKSEL as it always sets both RP0 and RP1 unnecessarily.

#### augustinetez

##### Active Member
I thought I had cleared out the bsf STATUS stuff.

Edit, I don't like BANKSEL as it always sets both RP0 and RP1 unnecessarily.
Does the job as long as you don't stick it after BTFSX and your not squeezed tor space - for me it comes from now using the 16F1827 where there's only one bit to change and saves having to look up the datasheet to find out where everything is.

Try this one Jaison.

#### Attachments

• rtp2022_628_5.asm
60.8 KB · Views: 56

#### Jaison

##### New Member
Bingo Gentlemen, Terry, Pommie and other colleagues for congratulations. Initial test ok, I will try the commands via DTMF to complete the test.

#### Jaison

##### New Member
Successfully executed DTMF tests, especially to you Terry and the other colleagues who collaborated with the work, thank you again for all your dedication. May the Great Architect who gave you this intelligence continue to bless you, and may your friends continue to dedicate this intelligence for good, on behalf of all radio amateurs in the southern region of Santa Catarina - Brazil I thank you again and I am available if you need me here . Thanks.

#### augustinetez

##### Active Member
73 Jaison - good to see all is finally working as it should.

Thanks to everyone else also for their input.

Replies
10
Views
946
Replies
8
Views
1K
Replies
4
Views
1K
Replies
2
Views
817
Replies
22
Views
2K