Author |
Message |
Topic: Timer problem in CCS 4.065 |
karlo
Replies: 2
Views: 3106
|
Forum: General CCS C Discussion Posted: Wed Jan 16, 2008 5:52 am Subject: Timer problem in CCS 4.065 |
I wound prefer to change your code in the interrupt routine
#byte PORT_B = 0x06
#INT_Timer1
void T1()
{
Output_toggle(PORT_B,0) ;
}
|
Topic: no timer1 interrupt on pic16f628 |
karlo
Replies: 12
Views: 11634
|
Forum: General CCS C Discussion Posted: Wed Jan 16, 2008 5:36 am Subject: no timer1 interrupt on pic16f628 |
I found out what the problem was, it had nothing to do with the interupt(routine)
I tested 2 variables with an if statement, if (var1 < var2)
If checked the assembly code and i saw ... |
Topic: while statement |
karlo
Replies: 5
Views: 4529
|
Forum: General CCS C Discussion Posted: Wed Jan 16, 2008 5:19 am Subject: while statement |
Hello,
You guy's are right.
The bit_test on the PIR1,0 !=1 ensures that the condition is checked and will stop the while loop if the conditiond are met.
This is what i did:
while(( ... |
Topic: while statement |
karlo
Replies: 5
Views: 4529
|
Forum: General CCS C Discussion Posted: Mon Jan 14, 2008 8:22 am Subject: while statement |
Hello,
I'm a beginner in programming PIC controllers in C, it's a little different the assembly language.
I made a loop with while statement
[code]
int8 count ;
while (count < 3 &&am ... |
Topic: no timer1 interrupt on pic16f628 |
karlo
Replies: 12
Views: 11634
|
Forum: General CCS C Discussion Posted: Fri Jan 11, 2008 9:53 am Subject: no timer1 interrupt on pic16f628 |
#if defined(__PCM__)
#include <16F628.H>
#fuses INTRC_IO,NOWDT,NOPROTECT,NOLVP
#ID CHECKSUM
typedef unsigned int8 uc;
int8 current ... |
Topic: no timer1 interrupt on pic16f628 |
karlo
Replies: 12
Views: 11634
|
Forum: General CCS C Discussion Posted: Fri Jan 11, 2008 5:24 am Subject: no timer1 interrupt on pic16f628 |
I've installed the MPLAB simulator to see what's happening.
The timer1 interrupt occurs and i made it visible by toggling the LCD backlight.
But when the interrupt service routine is finished, t ... |
Topic: no timer1 interrupt on pic16f628 |
karlo
Replies: 12
Views: 11634
|
Forum: General CCS C Discussion Posted: Wed Jan 09, 2008 7:48 am Subject: no timer1 interrupt on pic16f628 |
I did a test and it don't make a difference
What i did
#byte PIE1 = 0x8C
bit_set(PIE1,0) ;
But i've seen that i don't have a proper interrupt service routine.
The first few lines ,als ... |
Topic: no timer1 interrupt on pic16f628 |
karlo
Replies: 12
Views: 11634
|
Forum: General CCS C Discussion Posted: Wed Jan 09, 2008 6:56 am Subject: no timer1 interrupt on pic16f628 |
Hello,
I'm using an external crystal oscillator to create a real time counter, i've used a 2,457600 MHz crystal.
I've allready checked the oscillation frequency, test was ok
But i ve noticed ... |
Topic: defining constants in the EEPROM memory |
karlo
Replies: 5
Views: 6724
|
Forum: General CCS C Discussion Posted: Wed Jan 09, 2008 6:48 am Subject: defining constants in the EEPROM memory |
Thanks,
I tried the #ROM 2100 command and it really don't affect the ROM counter during compiling. |
Topic: defining constants in the EEPROM memory |
karlo
Replies: 5
Views: 6724
|
Forum: General CCS C Discussion Posted: Mon Jan 07, 2008 8:00 am Subject: defining constants in the EEPROM memory |
Hello,
I'm using a 16f628
I'd like to put a few constants in the eeprom memory, a common solution for this is
#rom 0x2100={1,2,3,4,5,6,7,8}
because my ROM memory is almost full i'd like to ... |
|