Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 23, 2024, 07:32:13 19:32


Login with username, password and session length


Pages: [1]
Print
Author Topic: Porting older PBP code to 16F182x?  (Read 6098 times)
0 Members and 2 Guests 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: 331

Thank You
-Given: 745
-Receive: 120


« 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: 4667

Thank You
-Given: 834
-Receive: 4321


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: 132

Thank You
-Given: 124
-Receive: 102


« 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