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

Search found 20 matches
CCS Forum Index
Author Message
  Topic: 16F648A UART problem
rodrigocirilo

Replies: 40
Views: 76776

PostForum: General CCS C Discussion   Posted: Sun May 31, 2020 3:06 pm   Subject: 16F648A UART problem
Thing was I was looking at all the rest of the code nearby as well.
Total several hours. It was the exact 'wrong' character that I looked
at and kept accepting... Sad

That's usually what happe ...
  Topic: 16F648A UART problem
rodrigocirilo

Replies: 40
Views: 76776

PostForum: General CCS C Discussion   Posted: Wed May 27, 2020 8:53 am   Subject: 16F648A UART problem
I must apologize to everyone for my lack of attention.
Yesterday I had found the Timer problem counting approximately 2.5 seconds, to set the variable with problem to 1. My problem was there, I set t ...
  Topic: 16F648A UART problem
rodrigocirilo

Replies: 40
Views: 76776

PostForum: General CCS C Discussion   Posted: Tue May 26, 2020 3:47 pm   Subject: 16F648A UART problem
I noticed that the flag_emergencia variable changes from 0 to 1 the moment I press the second digit of the password.

Let's say I'm going to enter password 1234, so when I press 1 it stays normal, w ...
  Topic: 16F648A UART problem
rodrigocirilo

Replies: 40
Views: 76776

PostForum: General CCS C Discussion   Posted: Tue May 26, 2020 12:23 pm   Subject: 16F648A UART problem
Look, I didn't quite understand the fact that changing the position of the variable declaration will affect something. I'll try.

In relation to being creative, I can use what little I know, I can s ...
  Topic: 16F648A UART problem
rodrigocirilo

Replies: 40
Views: 76776

PostForum: General CCS C Discussion   Posted: Tue May 26, 2020 10:47 am   Subject: 16F648A UART problem
I added 0x00 at the end of all strings and increased their sizes by 1 character, it worked, but the variable bug still persists.
  Topic: 16F648A UART problem
rodrigocirilo

Replies: 40
Views: 76776

PostForum: General CCS C Discussion   Posted: Tue May 26, 2020 8:45 am   Subject: 16F648A UART problem

Well, even though I didn't write the 0x00 at the end of the matrix,
it worked when I tested the send.
Can you show me what that would be like.

See the insertion of 0x00 below.
mystring [0& ...
  Topic: 16F648A UART problem
rodrigocirilo

Replies: 40
Views: 76776

PostForum: General CCS C Discussion   Posted: Tue May 26, 2020 7:56 am   Subject: 16F648A UART problem
The reason this works is you re-load this every time before sending,
so the overflow' doesn't cause disaster.

There are lots of similar issues with 'lack of control' of what the data
is doing.
...
  Topic: 16F648A UART problem
rodrigocirilo

Replies: 40
Views: 76776

PostForum: General CCS C Discussion   Posted: Tue May 26, 2020 6:51 am   Subject: 16F648A UART problem
Problem is you use sprintf to put the number into the array. A two digit
number needs three characters when stored as a string. Result in fact is that
the first character of sensor will be destroyed ...
  Topic: 16F648A UART problem
rodrigocirilo

Replies: 40
Views: 76776

PostForum: General CCS C Discussion   Posted: Tue May 26, 2020 6:33 am   Subject: 16F648A UART problem
There is also a huge problem with the sizes. For example:

if(ID == 255)
{
ID = 0;
}
sprintf(idd,"%u",ID);

Id is allowed to be up to 255. ...
  Topic: 16F648A UART problem
rodrigocirilo

Replies: 40
Views: 76776

PostForum: General CCS C Discussion   Posted: Tue May 26, 2020 6:18 am   Subject: 16F648A UART problem
In your text arrays, I notice you never write a final 0x00
to the last byte of the array to terminate the string.
This is required. Examples:
char mystring
You make this mistake with every buffer ...
  Topic: 16F648A UART problem
rodrigocirilo

Replies: 40
Views: 76776

PostForum: General CCS C Discussion   Posted: Tue May 26, 2020 6:16 am   Subject: 16F648A UART problem
I'm trying to understand your program.

Can you tell me what is the purpose of your program ? Explain the inputs to
the PIC, and explain how the PIC is supposed to respond to these inputs.
Well, ...
  Topic: 16F648A UART problem
rodrigocirilo

Replies: 40
Views: 76776

PostForum: General CCS C Discussion   Posted: Mon May 25, 2020 2:12 pm   Subject: 16F648A UART problem
Is your code that you posted the exact program that you are using
to get the flag_emergencia bug ?

Are you secretly turning on WDT and not telling us ?
Your posted code has it commented out. ...
  Topic: 16F648A UART problem
rodrigocirilo

Replies: 40
Views: 76776

PostForum: General CCS C Discussion   Posted: Mon May 25, 2020 1:18 pm   Subject: 16F648A UART problem
someone please help me with the variable changing value alone.
  Topic: 16F648A UART problem
rodrigocirilo

Replies: 40
Views: 76776

PostForum: General CCS C Discussion   Posted: Sun May 24, 2020 7:34 am   Subject: 16F648A UART problem
Now I'm back to pic 16F688, everything is going well in real / virtual.

But one thing is puzzling me.

The flag_emergencia variable starts with a value of 0, so I receive a keep alive via serial ...
  Topic: 16F648A UART problem
rodrigocirilo

Replies: 40
Views: 76776

PostForum: General CCS C Discussion   Posted: Sun May 24, 2020 7:26 am   Subject: 16F648A UART problem
Lets just list the problems of the standard software UART:

1) Half duplex only. Can only transmit or receive, not both at the same
time.
2) Has to be called before the character actually arrives ...
 
Page 1 of 2 Goto page 1, 2  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group