Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 04, 2016, 05:02:49 05:02


Login with username, password and session length


Pages: [1]
Print
Author Topic: Porting older PBP code to 16F182x?  (Read 1161 times)
0 Members and 1 Guest are viewing this topic.
Cain
Junior Member
**
Offline Offline

Posts: 90

Thank You
-Given: 102
-Receive: 106


« on: December 11, 2014, 04:44:15 16:44 »

Hi,

Anyone know the major differences between lets say 16F688 and eqvivalent 16F1825 (with the so called "Enhanced 14-bit core")?

I tried to port some old code but was surprised that hserin as well as the built in debug serial function did not work, same code works fine on the pin combatible 16F688?
Logged
Old_but_Alive
V.I.P
Active Member
*****
Offline Offline

Posts: 211

Thank You
-Given: 152
-Receive: 56


« Reply #1 on: December 11, 2014, 05:24:41 17:24 »

the newer PIC1825 is much more flexible, and you can change which pins do what.

So you must in the startup code set up the pin allocation registers to suit.

it should only minor though.

fuses will probably also need adjusting
Logged
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 3816

Thank You
-Given: 567
-Receive: 2049


There is no evidence that I muted SoNsIvRi


« Reply #2 on: December 11, 2014, 07:11:24 19:11 »

it's a well know issue. A double word config.
example.

__CONFIG(WDTDIS & XT & UNPROTECT);  // Program config. word 1
__CONFIG(FCMEN);                    // Program config. word 2
Logged

Note: If you have no posts other than, I want or reporting a dead link Then you can't complain If I remove your post So Stop Leeching
Checksum8
V.I.P
Junior Member
*****
Offline Offline

Posts: 71

Thank You
-Given: 44
-Receive: 53


« Reply #3 on: December 11, 2014, 11:56:58 23:56 »

Like Old but alive  mentioned more pins are multiplexed with other modules. If something is not working maybe another module is  using that pin by default.

See page 125 of the datasheet, you need to set these

APFCON0: ALTERNATE PIN FUNCTION CONTROL REGISTER 0
APFCON1: ALTERNATE PIN FUNCTION CONTROL REGISTER 1
Logged
Cain
Junior Member
**
Offline Offline

Posts: 90

Thank You
-Given: 102
-Receive: 106


« Reply #4 on: December 12, 2014, 07:11:31 07:11 »

Thank you for the pointers. Was a while since I used PIC's so need to read up on the datasheet.

Funny thing is that I did Google quite a bit before posting this and nothing usefull showed up but thats maybe my Google skillz sucking Wink
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC