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

TRIS PROBLEM

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







TRIS PROBLEM
PostPosted: Tue Jan 17, 2006 6:46 pm     Reply with quote

[code]
// ISD25120 TO PIC18F452 ADDRESS PINS. //
#BIT ISDADRS0 = 0XF82.0
#BIT ISDADRS1 = 0XF84.2
#BIT ISDADRS2 = 0XF84.1
#BIT ISDADRS3 = 0XF84.0
#BIT ISDADRS4 = 0XF80.5
#BIT ISDADRS5 = 0XF80.4
#BIT ISDADRS6 = 0XF80.3
#BIT ISDADRS7 = 0XF80.2
#BIT ISDADRS8 = 0XF80.1
#BIT ISDADRS9 = 0XF80.0
// ISD25120 DIRECT ADDRESS MACRO FUNCTION. //
#define ISDADRS(x) \
ISDADRS0 = x & 1; \
ISDADRS1 = (x >> 1) & 1; \
ISDADRS2 = (x >> 2) & 1; \
ISDADRS3 = (x >> 3) & 1; \
ISDADRS4 = (x >> 4) & 1; \
ISDADRS5 = (x >> 5) & 1; \
ISDADRS6 = (x >> 6) & 1; \
ISDADRS7 = (x >> 7) & 1; \
ISDADRS8 = (x >> 8) & 1; \
ISDADRS9 = (x >> 9) & 1

#use fast_io(A)
#use fast_io(b)
#use fast_io(c)
#use fast_io(d)
#use fast_io(e)

void main()
{

int16 x = 0;

SET_TRIS_A(0B11000000);
SET_TRIS_B(0B11111111);
SET_TRIS_C(0B10101110);
SET_TRIS_D(0B11100111);
SET_TRIS_E(0B11111000);

DO {
ISDADRS(x);
x=x+1;
delay_ms(10);
}
WHILE (x<1024);
}

Why some out pins not function when i use simulation on proteus?
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Tue Jan 17, 2006 8:33 pm     Reply with quote

Can you tell us which pins don't work? Might they be used by other processor functions like UART, SPI, or A/D? You may have to disable the other function to use the pin as general I/O.
_________________
The search for better is endless. Instead simply find very good and get the job done.
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