16F18875 Timer 2

A forums to allow bugs and problems with Flowcode v7 to be reported and resolved.

Moderator: Benj

Post Reply
medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

16F18875 Timer 2

Post by medelec35 »

interrupt handler is wrong.
Using PIE1 & PIR1 instead of PIE4 & PIR4
See https://www.matrixtsl.com/mmforums/viewtopic.php?f=54&t=17176&p=84214#p84214

Martin
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: 16F18875 Timer 2

Post by Benj »

Hi Martin,

Thanks for the bug fix, I'll roll it out to the family.

What do you think of these chips? We are looking to use the 16F18877 device on the PIC E-block. It's slightly cheaper and also more capable and highly remappable, though we will need to add support for remappable I2C into Flowcode.
PIC16F188xx.zip
(76.05 KiB) Downloaded 214 times

EtsDriver
Posts: 444
Joined: Tue Apr 15, 2014 4:19 pm
Location: Kajaani, Finland
Has thanked: 345 times
Been thanked: 227 times
Contact:

Re: 16F18875 Timer 2

Post by EtsDriver »

Benj wrote:Hi Martin,

Thanks for the bug fix, I'll roll it out to the family.

What do you think of these chips? We are looking to use the 16F18877 device on the PIC E-block. It's slightly cheaper and also more capable and highly remappable, though we will need to add support for remappable I2C into Flowcode.

PIC16F188xx.zip
My personal opinion is that these chips are great, and the similarness to 16F877 gives some advanges. Bigger memory, more space to do things that the old ones could not had fitted : like ethernet+can+sd+other peripherials on same project, 16F877 was too small on memory side, the 16F18877, it fits! :)
Ill just keep the good work up!

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: 16F18875 Timer 2

Post by medelec35 »

Hi Ben,
I have not tested for any other interrupts as just wanted to get Steve up and running.

Specification wise you can't go wrong with them.
I have only had a quick play with one and it works really well.

As cheaper and more memory it seems like a win win situation.

Martin

Edit:
Just checked the rest of the interrupts and there is an issue from Timer1 interrupt.

Code: Select all

Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

. .

Func test.c: main()
    92:	T1CONbits.T1OSCEN = 0;
	                  ^ (255) not a member of the struct/union ""
	                     ^ (182) illegal conversion between types
int -> volatile union S300
    94:	T1CONbits.TMR1CS1 = 1;
	                  ^ (255) not a member of the struct/union ""
	                     ^ (182) illegal conversion between types
int -> volatile union S300
(908) exit status = 1
(908) exit status = 1
All I did was add the timer1 interrupt, and left on the default options.
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: 16F18875 Timer 2

Post by Benj »

Aha thanks again Martin,

I've fixed that problem now and found a few more timer related typos, always helps to do some compilation testing.
PIC16F188xx.zip
(76.89 KiB) Downloaded 220 times

Post Reply