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

#fast_io problem

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



Joined: 15 Sep 2003
Posts: 75

View user's profile Send private message

#fast_io problem
PostPosted: Mon Apr 14, 2008 5:25 am     Reply with quote

I'm trying to use #fast_io() on different ports but I'm getting the following error message during compiling on ports e and g:

Option invalid Not a valid port: 69 (for #fast_io(e))
Option invalid Not a valid port: 71 (for #fast_io(g))

#fast_io() a to d are fine.

My declarations are:

#use fast_io(a)
#use fast_io(b)
#use fast_io(c)
#use fast_io(d)
#use fast_io(e)
#use fast_io(g)

#byte port_a = 0xF80
#byte port_b = 0xF81
#byte port_c = 0xF82
#byte port_d = 0xF83
#byte port_e = 0xF84
#byte port_f = 0xF85
#byte port_g = 0xF86

set_tris_a(0b00000000);
set_tris_b(0b00001111);
set_tris_c(0b10010000);
set_tris_d(0b00000000);
set_tris_e(0b00011100);
set_tris_g(0b00000100);

I use PIC18F6720 and PCWH V3.249.

I would appreciate any comments. Thanks.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Mon Apr 14, 2008 6:38 am     Reply with quote

I tried your code above on v3.249 and didn't get an error message. The only way to reproduce your error was by using a wrong device include file. For example when I include the file 18F458.h then I get an error message on the PortG because that port is missing on the PIC18F458.

Next time please post a complete program showing your problem. The program should be not larger than 15 lines and should include the #fuses etc., so we can copy/paste the code in our compiler.
TL



Joined: 15 Sep 2003
Posts: 75

View user's profile Send private message

PostPosted: Mon Apr 14, 2008 7:41 am     Reply with quote

Hi Ckielstra,

Many thanks for your good suggestion. Actually, the problem was due to E, F, G defines of ASCII chars in a header file which conflicted the port letters for fast_io(). When I renamed them, it compiled correctly.
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