Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 28, 2024, 07:18:06 19:18


Login with username, password and session length


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

Posts: 81

Thank You
-Given: 165
-Receive: 102


« on: December 11, 2014, 03:44:15 15: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
Senior Member
****
Offline Offline

Posts: 328

Thank You
-Given: 699
-Receive: 118


« Reply #1 on: December 11, 2014, 04:24:41 16: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

I fought Ohm's Law ...  and the law won
I only use Mosfets because I have a Bipolar mental disorder :-)
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 4639

Thank You
-Given: 823
-Receive: 4194


There is no evidence that I muted SoNsIvRi


« Reply #2 on: December 11, 2014, 06:11:24 18: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: I stoped Muteing bad members OK I now put thier account in sleep mode
Checksum8
Active Member
***
Offline Offline

Posts: 126

Thank You
-Given: 123
-Receive: 100


« Reply #3 on: December 11, 2014, 10:56:58 22: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: 81

Thank You
-Given: 165
-Receive: 102


« Reply #4 on: December 12, 2014, 06:11:31 06: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