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 73 matches
CCS Forum Index
Author Message
  Topic: Compile the same program for 2 different microcontrollers
erpgc82

Replies: 8
Views: 25928

PostForum: General CCS C Discussion   Posted: Fri Mar 18, 2022 11:08 am   Subject: Compile the same program for 2 different microcontrollers
yes, within the MPLAB

you really are an expert in C programming at CCS.
so even being grayed out, as if it were commented out, it will compile and work correctly!!!

I understood
Thank you for ...
  Topic: Compile the same program for 2 different microcontrollers
erpgc82

Replies: 8
Views: 25928

PostForum: General CCS C Discussion   Posted: Fri Mar 18, 2022 9:20 am   Subject: Compile the same program for 2 different microcontrollers
Hello friend Ttelmah, it seems that it is not correct as I am using the #if #endif directives.

the Code that appears between the directives, appears light gray, as if it was commented!


#includ ...
  Topic: ex. watchdog by serial communication or time in while
erpgc82

Replies: 6
Views: 22235

PostForum: General CCS C Discussion   Posted: Wed Mar 16, 2022 3:22 pm   Subject: ex. watchdog by serial communication or time in while
Good tip, I'll do it! The PIC18F46K22 is really big and stable, I really didn't understand until now what's going on, so I thought of Watchdog, which I've never used, I'm new to programming.

Dear e ...
  Topic: ex. watchdog by serial communication or time in while
erpgc82

Replies: 6
Views: 22235

PostForum: General CCS C Discussion   Posted: Wed Mar 16, 2022 3:20 pm   Subject: ex. watchdog by serial communication or time in while
Hello friend, yes I use a Buffer, I'm working with 26 bytes of characters and the buffer is 64 bytes.

Yes, as soon as the string ends, at the end I enter the '0' or '\0' by the way, it's very simil ...
  Topic: ex. watchdog by serial communication or time in while
erpgc82

Replies: 6
Views: 22235

PostForum: General CCS C Discussion   Posted: Wed Mar 16, 2022 11:57 am   Subject: ex. watchdog by serial communication or time in while
Hello friends, I'm trying a problem with the first program I made and put on a PC system.

The PIC18F46k22 receives a string from the PC, with a fixed number of characters, it happens that, every 50 ...
  Topic: Compile the same program for 2 different microcontrollers
erpgc82

Replies: 8
Views: 25928

PostForum: General CCS C Discussion   Posted: Sun Mar 06, 2022 2:34 pm   Subject: Compile the same program for 2 different microcontrollers
Hello friend, Ttelmah!

I understand now, what I wanted is not even possible, using #if, #else or #endif.

For what I wanted, it would suffice:

situation 1)
#include <18F252.h>
//and
/ ...
  Topic: Compile the same program for 2 different microcontrollers
erpgc82

Replies: 8
Views: 25928

PostForum: General CCS C Discussion   Posted: Sun Mar 06, 2022 11:46 am   Subject: Compile the same program for 2 different microcontrollers
Hello friends, I studied programming in 2020 until 2021, and learned to program Microcontrollers. I love doing it, that's what I'll do until the last day of my life.

I made a small program that use ...
  Topic: TTL barcode reader, electric pulse
erpgc82

Replies: 11
Views: 35011

PostForum: General CCS C Discussion   Posted: Tue Oct 12, 2021 2:48 pm   Subject: TTL barcode reader, electric pulse
Hello gentlemen, I called the oscilloscope and a network module that I can monitor via software.

I tested several codes, with 6 digits.

In the software, serial monitor, I get only 00 00 00 00 00 ...
  Topic: TTL barcode reader, electric pulse
erpgc82

Replies: 11
Views: 35011

PostForum: General CCS C Discussion   Posted: Tue Oct 12, 2021 10:33 am   Subject: TTL barcode reader, electric pulse
Start with an oscilloscope: probe the signal pin and see what the data looks like. You need to verify but I'd be willing to bet that the data is plain old TTL serial: 1 start bit, 8 data bits, no pari ...
  Topic: TTL barcode reader, electric pulse
erpgc82

Replies: 11
Views: 35011

PostForum: General CCS C Discussion   Posted: Tue Oct 12, 2021 10:29 am   Subject: TTL barcode reader, electric pulse
You may not have to start at all. Many of the scanner units already
contain their own hardware to actually read the code and just return
a serial decoded number from the code. You need to start by ...
  Topic: TTL barcode reader, electric pulse
erpgc82

Replies: 11
Views: 35011

PostForum: General CCS C Discussion   Posted: Tue Oct 12, 2021 9:29 am   Subject: TTL barcode reader, electric pulse
Hello friends, I'm new to programming, but in 1 year I've acquired enough knowledge to make 2 firmwares and everything works accurately, and help from you here. I'm happy.

But I'm trying to accompl ...
  Topic: convert char to integer?
erpgc82

Replies: 4
Views: 17725

PostForum: General CCS C Discussion   Posted: Mon Aug 23, 2021 10:16 am   Subject: convert char to integer?
Ok thank you PCM Programmer!

It worked, my problem is solved, really easy.

but the question is, what does this definition do?
#define toint(c) ((int)((c)-'0')) Laughing

create a definition c ...
  Topic: convert char to integer?
erpgc82

Replies: 4
Views: 17725

PostForum: General CCS C Discussion   Posted: Mon Aug 23, 2021 8:21 am   Subject: convert char to integer?
Hi, how do I convert characters to integers?

I'm getting serial numbers like: 1, 2, 3, 4, 5, 6.
But an example the 2 and the 3, I get 50 and 51.

I tried

value = (int) receive[x];
value = to ...
  Topic: RDM6300 replicating reads
erpgc82

Replies: 17
Views: 53655

PostForum: General CCS C Discussion   Posted: Sat Jul 10, 2021 8:50 pm   Subject: last doubt
just one last question, because in this previous post, you informed me that my work frequency setting is incorrect?

I'm not working at 64Mhz then?


there are some little faults. For example:
...
  Topic: RDM6300 replicating reads
erpgc82

Replies: 17
Views: 53655

PostForum: General CCS C Discussion   Posted: Sat Jul 10, 2021 8:46 pm   Subject: RDM6300 replicating reads
OK. Typed the code in. Two mistakes. I'd left out the 16 on a variable name,
and added 10 not subtracted it:

int8 hexval(int8 chr)
{
if (chr>='0' && chr<='9'&# ...
 
Page 1 of 5 Goto page 1, 2, 3, 4, 5  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group