Author |
Message |
Topic: Any idea what is wrong with this union? |
gjm27n
Replies: 1
Views: 6654
|
Forum: General CCS C Discussion Posted: Sun Jul 10, 2016 1:28 pm Subject: Any idea what is wrong with this union? |
Here are relevant snippets of code
union LONG_UNION
{
signed int32 sl;
unsigned int32 ul;
signed int16 si[2];
unsigned int16 ui[2];
signed int8 sc[4];
u ... |
Topic: Port B interrupts no longer working using 5.061 |
gjm27n
Replies: 29
Views: 46715
|
Forum: General CCS C Discussion Posted: Wed Jul 06, 2016 12:50 pm Subject: Port B interrupts no longer working using 5.061 |
Thanks, I plan on looking into restructuring the code when I have time. I'm already at 85% of ROM usage on the 18F452 so at some point I'll need to address it. |
Topic: Port B interrupts no longer working using 5.061 |
gjm27n
Replies: 29
Views: 46715
|
Forum: General CCS C Discussion Posted: Wed Jul 06, 2016 10:02 am Subject: Port B interrupts no longer working using 5.061 |
Thanks for you input.
I agree with K&R and this is the only exception I ever use one in (In my day job, I'm a C++ engineer for the Aerospace industry and we have very strict coding standards). ... |
Topic: Port B interrupts no longer working using 5.061 |
gjm27n
Replies: 29
Views: 46715
|
Forum: General CCS C Discussion Posted: Tue Jul 05, 2016 9:16 pm Subject: Port B interrupts no longer working using 5.061 |
Here are relevant snippets of code. On C_CLAMP_FWD_IN, the bit test gets optimized out so it immediately advances to the next step before the CLMP_FWD_IN prox switch is made. This happens with every r ... |
Topic: Port B interrupts no longer working using 5.061 |
gjm27n
Replies: 29
Views: 46715
|
Forum: General CCS C Discussion Posted: Tue Jul 05, 2016 9:10 am Subject: Port B interrupts no longer working using 5.061 |
I use these chips in embedded boards I have designed to run industrial equipment. When running in automatic mode, I use a state machine to sequence the operations. Each output requires a specific inpu ... |
Topic: Port B interrupts no longer working using 5.061 |
gjm27n
Replies: 29
Views: 46715
|
Forum: General CCS C Discussion Posted: Mon Jul 04, 2016 3:45 pm Subject: Port B interrupts no longer working using 5.061 |
The original program is working again. So, what I have I learned? Lots, but most important,
MPLAB 8.63 and CCS 5.061 BAD!
MPLAB 8.92 and CCS 5.061 GOOD!
But going forward, you guys have helped ... |
Topic: Port B interrupts no longer working using 5.061 |
gjm27n
Replies: 29
Views: 46715
|
Forum: General CCS C Discussion Posted: Mon Jul 04, 2016 3:23 pm Subject: Port B interrupts no longer working using 5.061 |
WOO HOO!!!! Upgraded to 8.92 and my hex file matches yours and works.
Now to get my original program running again. |
Topic: Port B interrupts no longer working using 5.061 |
gjm27n
Replies: 29
Views: 46715
|
Forum: General CCS C Discussion Posted: Mon Jul 04, 2016 3:10 pm Subject: Port B interrupts no longer working using 5.061 |
Yep, yours works. Upgrading to 8.92 now since that appears to be the only difference. |
Topic: Port B interrupts no longer working using 5.061 |
gjm27n
Replies: 29
Views: 46715
|
Forum: General CCS C Discussion Posted: Mon Jul 04, 2016 2:55 pm Subject: Port B interrupts no longer working using 5.061 |
Can you post a copy of your hex file that works? Also let me know what baud it uses. |
Topic: Port B interrupts no longer working using 5.061 |
gjm27n
Replies: 29
Views: 46715
|
Forum: General CCS C Discussion Posted: Mon Jul 04, 2016 2:53 pm Subject: Port B interrupts no longer working using 5.061 |
I have version 4.119 and MPLAB 8.63 on my notebook and compiled the code. Burned a chip and tested it. It didn't generate an interrupt. Ran a diff on the files and there is a bit of difference. Couldn ... |
Topic: Port B interrupts no longer working using 5.061 |
gjm27n
Replies: 29
Views: 46715
|
Forum: General CCS C Discussion Posted: Mon Jul 04, 2016 2:13 pm Subject: Port B interrupts no longer working using 5.061 |
I have a dumb question, how do I post a hex file? |
Topic: Port B interrupts no longer working using 5.061 |
gjm27n
Replies: 29
Views: 46715
|
Forum: General CCS C Discussion Posted: Mon Jul 04, 2016 11:57 am Subject: Port B interrupts no longer working using 5.061 |
Out of desperation (I have an angry customer and this is way overdue), I decided to re-wire stuff so I can test the simple routine.
I wired B6 & B7 with 10K pull-ups and a switch to ground so I ... |
Topic: Port B interrupts no longer working using 5.061 |
gjm27n
Replies: 29
Views: 46715
|
Forum: General CCS C Discussion Posted: Sun Jul 03, 2016 10:35 pm Subject: Port B interrupts no longer working using 5.061 |
In MPLAB, Project->Build Options->Project
Under CCS Compiler Tab, Category->Optimization, slider to low.
+DF +LN I+="$(INCDIR)" +T +A +M -Z +Y=0 +EA
The Y value is optimization |
Topic: Port B interrupts no longer working using 5.061 |
gjm27n
Replies: 29
Views: 46715
|
Forum: General CCS C Discussion Posted: Sun Jul 03, 2016 7:25 pm Subject: Port B interrupts no longer working using 5.061 |
Thanks, knowing it still works means my code is the issue and gives me a direction forward. Something may have changed between 4.016 and 5.061 that allowed it before and needs to be fixed now. |
Topic: Port B interrupts no longer working using 5.061 |
gjm27n
Replies: 29
Views: 46715
|
Forum: General CCS C Discussion Posted: Sun Jul 03, 2016 1:45 am Subject: Port B interrupts no longer working using 5.061 |
I don't get any warnings that would matter, just variables not used. i could write a simple program but wouldn't have an easy way of testing it. This chip goes into a board that controls industrial eq ... |
|