CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

addressmod

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
maikelmeyers
Guest







addressmod
PostPosted: Thu Jan 11, 2007 6:00 am     Reply with quote

I want to use addressmod for eeprom access and it does'nt function. Here is my source:

#include "18F4520.h"

#FUSES EC_IO,NOWDT,NOLVP
#USE delay(clock=4M)
#USE rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7)

typedef unsigned int8 ubyte;
typedef unsigned int16 ubyte2;
typedef unsigned int32 ubyte4;
typedef signed int8 sbyte;
typedef signed int16 sbyte2;
typedef signed int32 sbyte4;

void DataEE_Read(int32 addr, int8 * ram, int bytes)
{
int i;
for(i=0;i<=bytes;i++,ram++,addr++)
*ram=read_eeprom(addr);
}

void DataEE_Write(int32 addr, int8 * ram, int bytes)
{
int i;
for(i=0;i<=bytes;i++,ram++,addr++)
write_eeprom(addr,*ram);
}
addressmod <DataEE_Read>DataEE;

void main()
{
ubyte DataEE test;
test = 20;
printf("%u\r",test);
while(1);
}

I tested the read_eeprom and write_eeprom functions and they work
Ttelmah
Guest







PostPosted: Thu Jan 11, 2007 6:11 am     Reply with quote

Use V3.249, and use typemod.
Addressmod, doesn't work. Look at the thread about V4 compiler problems, where this has been discussed a dozen or more times...
In common with most of the 'new' features, this is still buggy.

Best Wishes


CCS Technical Support does not monitor this forum on a regular basis. Please do not post bug reports to this form. All bug reports should be emailed to [email protected]. Thank you.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group