Author |
Message |
Topic: Multiple compilation units |
picman62
Replies: 4
Views: 8358
|
Forum: General CCS C Discussion Posted: Tue Feb 24, 2015 10:51 am Subject: Multiple compilation units |
Thanks for clarifying this. |
Topic: Multiple compilation units |
picman62
Replies: 4
Views: 8358
|
Forum: General CCS C Discussion Posted: Tue Feb 24, 2015 4:47 am Subject: Multiple compilation units |
Hi.
When is it an advantage to create a project with multiple compilation units and how effective is it compared to building a regular single project? |
Topic: Interrupt affecting main code |
picman62
Replies: 25
Views: 28712
|
Forum: General CCS C Discussion Posted: Sat Feb 14, 2015 3:56 am Subject: Interrupt affecting main code |
What a shocker. Of course. 'PER_SECOND' should be fixed since this is what determines the value for the counter. All that was required was a variable to set led_count a rate. Enter led_time.
Regar ... |
Topic: Interrupt affecting main code |
picman62
Replies: 25
Views: 28712
|
Forum: General CCS C Discussion Posted: Fri Feb 13, 2015 4:14 pm Subject: Interrupt affecting main code |
Start using your brain a bit.
All you need to do is set the LED rate with a global variable, instead of with a define. Change the value of this variable in your main.
Ok, this part I understood. ... |
Topic: Interrupt affecting main code |
picman62
Replies: 25
Views: 28712
|
Forum: General CCS C Discussion Posted: Fri Feb 13, 2015 1:59 pm Subject: Interrupt affecting main code |
Hi, Ttelmah,
One last help buddy.
Considering your code below which I made slight changes to fit the LED rate for my purposes:
#define PER_SECOND 126
int8 count;
#int_timer0
void TimerLED( ... |
Topic: Interrupt affecting main code |
picman62
Replies: 25
Views: 28712
|
Forum: General CCS C Discussion Posted: Fri Feb 13, 2015 6:24 am Subject: Interrupt affecting main code |
Thanks, I will try this.
Best regards. |
Topic: Interrupt affecting main code |
picman62
Replies: 25
Views: 28712
|
Forum: General CCS C Discussion Posted: Thu Feb 12, 2015 5:50 am Subject: Interrupt affecting main code |
Please, disconsider what I have said above.
This offset was from PT simulator. Before leaving home now, I did it with the protoboard and it was fine. Reading 4999-5000Hz.
Since we are into this, o ... |
Topic: Interrupt affecting main code |
picman62
Replies: 25
Views: 28712
|
Forum: General CCS C Discussion Posted: Thu Feb 12, 2015 5:28 am Subject: Interrupt affecting main code |
First, thank you very much.
Your original 'per second value'
#define PER_SECOND 125
was displaying an offset in the frequency value. 5000Hz signal was shown as 4960Hz.
I changed this value t ... |
Topic: Interrupt affecting main code |
picman62
Replies: 25
Views: 28712
|
Forum: General CCS C Discussion Posted: Thu Feb 12, 2015 4:00 am Subject: Interrupt affecting main code |
You need to marshal your thoughts.
Make a simple, clear, concise list of what needs to happen.
Show us the latest version of your code.
Explain what works and precisely what is wrong with what do ... |
Topic: Interrupt affecting main code |
picman62
Replies: 25
Views: 28712
|
Forum: General CCS C Discussion Posted: Wed Feb 11, 2015 2:35 pm Subject: Interrupt affecting main code |
Yes, I don't know enough C to solve my problems. But I am striving. I knew nothing in early december. Thanks to some reading in this forum, today I am in the end part of my first code which is not so ... |
Topic: Interrupt affecting main code |
picman62
Replies: 25
Views: 28712
|
Forum: General CCS C Discussion Posted: Wed Feb 11, 2015 8:21 am Subject: Interrupt affecting main code |
I wrote another code only featuring the timer0 interrupt and the counter instruction in the main. It worked now.
I used Ttelmah's code, but another similar code also worked.
#include <16f877a. ... |
Topic: Interrupt affecting main code |
picman62
Replies: 25
Views: 28712
|
Forum: General CCS C Discussion Posted: Tue Feb 10, 2015 6:56 pm Subject: Interrupt affecting main code |
Well, I spent all day away from my protoboard and was simulating everyting in PT.
I just got home and put the code to test in the hardware. Actually the frequency counter is indeed working. But not t ... |
Topic: Interrupt affecting main code |
picman62
Replies: 25
Views: 28712
|
Forum: General CCS C Discussion Posted: Tue Feb 10, 2015 5:35 pm Subject: Interrupt affecting main code |
Thanks, you're right. Should be 256 max. I was playing with the led rate and got lost in the value limit.
I just set it to 6 (256-6), but no change. Frequency counter offset value decreased but sti ... |
Topic: Interrupt affecting main code |
picman62
Replies: 25
Views: 28712
|
Forum: General CCS C Discussion Posted: Tue Feb 10, 2015 4:43 pm Subject: Interrupt affecting main code |
I've got a problem with a frequency counter not working right when the LED starts blinking.
I have this LED in a TIMER0 interrupt and the frequency counter in the main code. When the interrupt is exc ... |
Topic: Timer1 in RC0 and RC1 |
picman62
Replies: 81
Views: 84439
|
Forum: General CCS C Discussion Posted: Thu Jan 29, 2015 8:13 pm Subject: Timer1 in RC0 and RC1 |
I think I might have found something that I believe it's not included in the guidelines. It relates to Proteus.
I changed the delays of the LEDs making them longer and the PWM pulses shorter. The LEd ... |
|