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 support@ccsinfo.com

16f628 Port A

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



Joined: 07 Sep 2003
Posts: 60
Location: Buenos Aires (Argentina)

View user's profile Send private message Send e-mail MSN Messenger

16f628 Port A
PostPosted: Fri Jul 25, 2003 12:19 pm     Reply with quote

Why I can't write in port A ??

#include <16f628.H>
#fuses INTRC_IO, NOLVP, NOWDT, PUT, BROWNOUT
#use delay(clock=4000000)
#USE STANDARD_IO(A)
#byte port_a = 5

main() {

int count;
setup_comparator(NC_NC_NC_NC);
set_tris_a(0);

do {
for(count = 0; count <=15; ++count)
output_a(count); // ********* can't write .... why?
// **********************************
delay_ms(1000);

} while (1);
}
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516364
_________________
Best Regards
Daniel H. Sagarra
La Plata (Argentina)
Chris Burger
Guest







Re: 16f628 Port A
PostPosted: Fri Jul 25, 2003 1:35 pm     Reply with quote

Change your program in:
(you are writing 16 times to portA within some microsec and after that you give one (1) second delay.)

do {
for(count = 0; count <=15; ++count)
{
output_a(count);
delay_ms(1000);
}
}
while (1);
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516368
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