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

[SOLVED]PIC18F4550 + HC-05 module receiving wrong characters
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
pizdec



Joined: 21 Sep 2018
Posts: 6

View user's profile Send private message

PostPosted: Tue Oct 02, 2018 4:12 am     Reply with quote

Ttelmah wrote:
As a further comment, the HC05, should not work with the 16F877A either,
unless you are either using the LF version of the PIC and running it at 3.3v,
or are using software RS232, rather than the hardware port (the software
serial has TTL input thresholds, rather than Schmitt thresholds).

The HC05, is based on the BlueCore4 chipset, and this does not produce
enough output voltage to drive the PIC hardware UART input pins on a 5v
PIC.

Have you got any test instruments at all?.
If you have a scope, you need to be looking at the waveforms. Does the
serial input to the PIC go up to at least 4v. It isn't going to work unless it
does.


Thank you. You were right, CPUDIV1 solved half of the issue, the other part was that I was receiving the '\r' char after every char, so I added a filter to avoid to take that char now it works fine.

It worked for the PIC18F4550 and working for the PIC16F877A.

A curious thing, I have 2 PIC16F877A, both are a bit different, one is '1441BE' and it always worked without this. But the other one is '12913B0', and it had the same issue as the PIC18F4550. Luckly I solved it for both of them by the same way. Smile
Ttelmah



Joined: 11 Mar 2010
Posts: 19551

View user's profile Send private message

PostPosted: Tue Oct 02, 2018 4:49 am     Reply with quote

Normally PIC ID numbers are YYWWNNN. Your numbers don't look 'right' for this.
Year of manufacture.
Week.
Alphanumeric manufacture location.

Suggests one is perhaps an older batch, possibly with a lower input threshold, so it worked!...

Ah. I realise you are giving the ID read from the programmer.

The B0 one is a very old chip. Interesting that the newer one works better.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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