Page 1 of 1

16F18875 Timer 2

Posted: Sun Sep 24, 2017 1:13 pm
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

Re: 16F18875 Timer 2

Posted: Thu Sep 28, 2017 2:53 pm
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 234 times

Re: 16F18875 Timer 2

Posted: Thu Sep 28, 2017 4:55 pm
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! :)

Re: 16F18875 Timer 2

Posted: Fri Sep 29, 2017 10:19 am
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.

Re: 16F18875 Timer 2

Posted: Fri Sep 29, 2017 4:25 pm
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 267 times