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

Problem with getc()

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



Joined: 10 Dec 2011
Posts: 376
Location: Sofiq,Bulgariq

View user's profile Send private message

Problem with getc()
PostPosted: Thu Aug 09, 2012 12:32 pm     Reply with quote

Why I can't get any character through rs232 ?
Code:

#include <16f84a.h>
#fuses NOWDT
#use delay(clock=4M)
#use rs232(baud=9600, xmit=PIN_b0,rcv=PIN_b1)

void main()
{
while (true)
   {
   putc(getc());
   delay_ms(100);
   }
}

When I press some letter on my keyboard, I get nothing on the screen.
Maybe there is something wrong in my code.
I test it on ISIS Proteus.
PCM programmer



Joined: 06 Sep 2003
Posts: 20399

View user's profile Send private message

PostPosted: Thu Aug 09, 2012 12:54 pm     Reply with quote

The most likely reason is that Proteus doesn't support software "bit banging" serial communications.

Change to a PIC that has a hardware UART, connect to the UART pins,
and try again. For example, 16F88, or 16F887.
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Thu Aug 09, 2012 6:59 pm     Reply with quote

I don't see the advantage for this board in fielding Proteus questions.
First the issues appear to give the benefit of doubt to Proteus and pass the issue as a probable CCS compiler error. These Proteus false negatives toward CCS call into question the quality of the CCS Compiler. Establishing that Proteus is the issue does nothing since Proteus probably doesn't accept bug reports from this board. Sure the questioner can always pull the wool over our eyes and say there is a real PIC and circuitry but that dishonesty shouldn't mean that this board accepts the diversion a blatant Proteus question creates for this board.
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