Author |
Message |
Topic: reading 16-bits registers |
alexbilo
Replies: 3
Views: 6758
|
Forum: General CCS C Discussion Posted: Sun Feb 06, 2005 12:37 pm Subject: reading 16-bits registers |
Hi all,
Does any1 would know how to do read a 16-bits register (TMR1H:TMR1L per example) without using the built-in make16 function?
I built one using pointers and it works, but it access the re ... |
Topic: i2c : slave misses data |
alexbilo
Replies: 6
Views: 12474
|
Forum: General CCS C Discussion Posted: Fri Oct 01, 2004 12:43 pm Subject: i2c : slave misses data |
Hi,
I got it to work by adding delays between each i2c commands. Seems that the slave's ISR wasn't fast enough finaly.
Thanks to all... |
Topic: i2c : slave misses data |
alexbilo
Replies: 6
Views: 12474
|
Forum: General CCS C Discussion Posted: Fri Oct 01, 2004 11:52 am Subject: i2c : slave misses data |
Since the code is a little bit complicated, I choosed to explain it in words instead... But since you ask for it
Note that I use my own functions, not the CCS' functions.
Master code :
... |
Topic: i2c : slave misses data |
alexbilo
Replies: 6
Views: 12474
|
Forum: General CCS C Discussion Posted: Fri Oct 01, 2004 9:19 am Subject: i2c : slave misses data |
Hi,
If this is the problem then investigate using high priority interrupts and assembler with a RETFIE 1
I tried the fast interrupts to be sure, because it's possible that the lenghty ISR I use ... |
Topic: i2c : slave misses data |
alexbilo
Replies: 6
Views: 12474
|
Forum: General CCS C Discussion Posted: Thu Sep 30, 2004 4:03 pm Subject: i2c : slave misses data |
Hi,
I'm working on a pic to pic i2c communication link.
Master : PIC18F452 (running at 40MHz)
Slave : PIC18F452 (running at 10MHz)
The master executes a comm. routine which sends many bytes ... |
Topic: operation freq. stability |
alexbilo
Replies: 2
Views: 8296
|
Forum: General CCS C Discussion Posted: Thu Sep 30, 2004 1:17 pm Subject: operation freq. stability |
I think that it solved my issue...
THANKS A LOT! |
Topic: operation freq. stability |
alexbilo
Replies: 2
Views: 8296
|
Forum: General CCS C Discussion Posted: Thu Sep 30, 2004 12:34 pm Subject: operation freq. stability |
Hi,
I'm banging my head into the wall these days... First problem, I have a PIC18f452 operating in PLL mode with a 10MHz xtal. I use the delay_ms() functions to flash a led. Sometimes it op ... |
Topic: i2c master reception |
alexbilo
Replies: 1
Views: 6807
|
Forum: General CCS C Discussion Posted: Wed Sep 29, 2004 2:43 pm Subject: i2c master reception |
Hi,
I read this section in the PIC18fxx2 datasheet (doc 39564b.pdf) and I don't really understand the logic of it :
Note: In the MSSP module, the RCEN bit must
be set after the ACK sequence or ... |
Topic: Problem with TXD interrupt |
alexbilo
Replies: 8
Views: 15966
|
Forum: General CCS C Discussion Posted: Fri Sep 17, 2004 7:16 am Subject: Problem with TXD interrupt |
If it is a static , so it won't change will it?
Actually, declaring a variable as static means that it'll keep its value from one call of the function to the next. On the other hand, if it isn't ... |
Topic: low current (1 ma) LED is draining 25ma |
alexbilo
Replies: 6
Views: 11096
|
Forum: General CCS C Discussion Posted: Wed Sep 15, 2004 1:17 pm Subject: low current (1 ma) LED is draining 25ma |
Hi,
You should always use a resistor to limit the LED current. Omitting this resistor can lead the destruction of the pin and/or the LED.
Most of the time 220 ohms is a good resistor value, but ... |
Topic: Sanity check please |
alexbilo
Replies: 13
Views: 19595
|
Forum: General CCS C Discussion Posted: Wed Sep 15, 2004 9:56 am Subject: Sanity check please |
I found that when these problems arise, looking at the assembly code listing is of great help. You can take a look at the code generated by the compiler to configure the RS232 module to see if the bau ... |
Topic: RAM used in variable declaration |
alexbilo
Replies: 9
Views: 14935
|
Forum: General CCS C Discussion Posted: Tue Sep 14, 2004 8:18 pm Subject: RAM used in variable declaration |
The best way I know to save RAM is to use effeciently the different data types. Meaning that you should ask yourself what is the range needed for a given variable and choose the appropriate data type ... |
Topic: i2c master hanging |
alexbilo
Replies: 11
Views: 19824
|
Forum: General CCS C Discussion Posted: Wed Sep 08, 2004 9:31 pm Subject: i2c master hanging |
I must admit that this looks like a compiler bug. Anyway I'll make sure by replacing this routine by my own (which, of course, cannot be wrong... ...). I hope that, as Trampas pointed, I can a ... |
Topic: i2c master hanging |
alexbilo
Replies: 11
Views: 19824
|
Forum: General CCS C Discussion Posted: Wed Sep 08, 2004 3:44 pm Subject: i2c master hanging |
Actually I use v.3.187... Hope this isn't a compiler bug
From the ASM listing and the ICD2 debugger I can see that the problem is this SSPIF that never gets set...
But does this result ... |
Topic: i2c master hanging |
alexbilo
Replies: 11
Views: 19824
|
Forum: General CCS C Discussion Posted: Wed Sep 08, 2004 12:18 pm Subject: i2c master hanging |
Sorry about the ASM listing, I just posted this snippet because this is the code for the i2c_write() function. Since this is a built-in function, I cannot access the C code (not even sure there IS C c ... |
|