Author |
Message |
Topic: Problem with #locate and sizeof() |
JacquesB
Replies: 5
Views: 9463
|
Forum: General CCS C Discussion Posted: Thu Feb 19, 2015 12:42 pm Subject: Problem with #locate and sizeof() |
Thanks Jeremiah for your good explanations. I got it.
Thanks also to Ttelmah, I'll take your suggestion |
Topic: Problem with #locate and sizeof() |
JacquesB
Replies: 5
Views: 9463
|
Forum: General CCS C Discussion Posted: Wed Feb 18, 2015 12:31 pm Subject: Problem with #locate and sizeof() |
Yes but with a union all members start at the same memory location.
I want the payload structure to be at the end of the Rx_Hdr structure.
right now if I use #locate Payload= RxBuff+ 3, the progra ... |
Topic: Problem with #locate and sizeof() |
JacquesB
Replies: 5
Views: 9463
|
Forum: General CCS C Discussion Posted: Wed Feb 18, 2015 10:51 am Subject: Problem with #locate and sizeof() |
Hi,
I'm having difficulties with the use of #locate and sizeof() to get the dimension of a structure
I have a receive buffer that share the same space as 2 structures, one for the header part and ... |
Topic: Addresses of parameters in internal EEPROM |
JacquesB
Replies: 7
Views: 11883
|
Forum: General CCS C Discussion Posted: Mon Nov 17, 2014 8:06 am Subject: Addresses of parameters in internal EEPROM |
Hi asmboy
Your're right. that's stupid.
the original program is much more complex and I wanted emphasize the definition part and I screwed the main(). (copy paste!)
the main() should have been ... |
Topic: Addresses of parameters in internal EEPROM |
JacquesB
Replies: 7
Views: 11883
|
Forum: General CCS C Discussion Posted: Fri Nov 14, 2014 10:43 am Subject: Addresses of parameters in internal EEPROM |
Hi,
I want to place some parameters in the pic's internal EEPROM and have them programmed during device programming.
Presently I have a working code but I'm wondering if there would be a better wa ... |
Topic: Initializing EEPROM |
JacquesB
Replies: 4
Views: 8102
|
Forum: General CCS C Discussion Posted: Fri Mar 16, 2012 2:02 pm Subject: Initializing EEprom from MPlab |
Thanks for taking time to show me where to find the information.
I would never have found this info in a programming sheet. I was looking in the spec sheet!
It works (after figure out to check & ... |
Topic: Initializing EEPROM |
JacquesB
Replies: 4
Views: 8102
|
Forum: General CCS C Discussion Posted: Fri Mar 16, 2012 11:50 am Subject: Initializing EEPROM |
Thanks Ttelmah,
I'm not very familiar with all this but, I just tried it with a very simple program and I get:
--- Info 300 "test.c" Line 9(0,1): More info: Segment at 00000-00008 ( ... |
Topic: Initializing EEPROM |
JacquesB
Replies: 4
Views: 8102
|
Forum: General CCS C Discussion Posted: Fri Mar 16, 2012 9:39 am Subject: Initializing EEPROM |
Hi
I want to set parameters in EEPROM while programming the micro.
I've tried using #rom adress={,} but I can't make it work.
After compiling and downloading the code the EEPROM windows continue to ... |
Topic: Using Internal Oscillator and getting back 2 IOs |
JacquesB
Replies: 4
Views: 5161
|
Forum: General CCS C Discussion Posted: Tue Mar 10, 2009 2:34 pm Subject: Using Internal Oscillator and getting back 2 IOs |
After replacing output_high(PIN_A7); & output_high(PIN_A6);
by
output_a(0x80); & output_a(0xC0); ....
I got the same 500hz signal
I don't know what I was doing wrong at the beginning b ... |
Topic: Using Internal Oscillator and getting back 2 IOs |
JacquesB
Replies: 4
Views: 5161
|
Forum: General CCS C Discussion Posted: Tue Mar 10, 2009 1:57 pm Subject: Using Internal Oscillator and getting back 2 IOs |
It works , I 've got a 500Hz signal !
I don't understand why output_high(PIN_A7); works but not
output_a(0x80);
I need to change RA6 & Ra7 both at the same time. That's why I've used Outp ... |
Topic: Using Internal Oscillator and getting back 2 IOs |
JacquesB
Replies: 4
Views: 5161
|
Forum: General CCS C Discussion Posted: Tue Mar 10, 2009 12:54 pm Subject: Using Internal Oscillator and getting back 2 IOs |
Hi,
I'm trying to use OSC0 & OSC1 pin as general purpose IOs (RA6 & RA7) but I can't make one of them work.
I'm using a PIC18F2525 on a PICDEM2 plus eval board and the compiler is 4.071. ... |
Topic: Compiling problem with I2C |
JacquesB
Replies: 11
Views: 19210
|
Forum: General CCS C Discussion Posted: Wed Feb 18, 2009 1:10 pm Subject: Compiling problem with I2C |
Your're probably right. I did look at it like this.
But I started my program using an example from CCS manual: (p.172)
i2c_start(); // Start condition
i2c_write(0xc1); // Device add ... |
Topic: Compiling problem with I2C |
JacquesB
Replies: 11
Views: 19210
|
Forum: General CCS C Discussion Posted: Mon Feb 09, 2009 10:25 am Subject: Compiling problem with I2C |
I just find out the solution for SDA line stuck at 0 after i2c_read().
On last byte to read i must not acknowledge it so that slave doesn't wait indefinitively for transmitting another byte.
So I us ... |
Topic: Compiling problem with I2C |
JacquesB
Replies: 11
Views: 19210
|
Forum: General CCS C Discussion Posted: Mon Feb 09, 2009 9:45 am Subject: Compiling problem with I2C |
Hi,
I'm having another problem regarding the function i2c_poll.
I was able to communicate with an I2C chip but unable to read data from it. Every time the program went into rddata() it run indefin ... |
Topic: Compiling problem with I2C |
JacquesB
Replies: 11
Views: 19210
|
Forum: General CCS C Discussion Posted: Fri Feb 06, 2009 1:59 pm Subject: Compiling problem with I2C |
I didn't noticed that i2c_write() would returned the ack bit
thanks |
|