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

16f88 analog problems

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



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

16f88 analog problems
PostPosted: Wed Aug 25, 2004 6:58 pm     Reply with quote

Quick question: are there any known bugs with v3.178 and the 16f87 & 16f88?

I developed a system using a 16f877 to prototype everything, and it works great. I ported the code over to a 16f88, and I can't even get it to flash LEDs properly. Will I have to upgrade my compiler?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Aug 26, 2004 1:13 am     Reply with quote

I wish you had looked in the archives.

Someone posted a work-around for the UART problem.
They said you can trick the compiler into using the hardware UART
by giving it pins C6 and C7 in the #use rs232() statement.

I tried that just now, and it appears to talk to the proper registers.
I installed PCM vs. 3.178 for this test. Look at the .LST file to
confirm the results.

Code:
#include <16F88.h>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock = 4000000)
#define PIN_C6  62
#define PIN_C7  63
#use rs232(baud = 9600, xmit=PIN_C6, rcv=PIN_C7)

//====================================
void main()
{
char c;

while(1)
  {
   c = getc();
   putc(c);
  }

}
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Thu Aug 26, 2004 9:29 am     Reply with quote

PCM,

I wish it was spelled out like that in the archives. I did search through it - many times - yesterday, and I did find that trick. What I did was assign the uart's tx and rx pins in the #use rs232 definition, only to have it rejected by the compiler. It didn't occur to me to (mis)define pins C6 and C7 beforehand. I will try that out. Thanks for the suggestion.
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