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 65 matches
CCS Forum Index
Author Message
  Topic: Converting raw string to int
foodwatch

Replies: 13
Views: 24745

PostForum: General CCS C Discussion   Posted: Thu Mar 26, 2020 6:43 am   Subject: Working
I added the following to the top of your code and now its working ok

nFreq = (buffer[8] >> 4 ) * 10000;
and changed the = to += in the top line of your code. Thanks for all ...
  Topic: Converting raw string to int
foodwatch

Replies: 13
Views: 24745

PostForum: General CCS C Discussion   Posted: Thu Mar 26, 2020 6:25 am   Subject: Update
Thanks to you both for the recommendations. I have it working with your code with the exception that any frequency over 10000 does not calculate correctly

0xFE 0xFE 0x00 0x54 0x00 0x20 0x49 0x14 0 ...
  Topic: Converting raw string to int
foodwatch

Replies: 13
Views: 24745

PostForum: General CCS C Discussion   Posted: Wed Mar 25, 2020 5:58 pm   Subject: Converting raw string to int
char cTemp;
int8 sBuffer[12];

//------------- rs232 interrupt routine--------------------------------------
#int_rda //turn on serial interrupt
void serial_isr() ...
  Topic: Converting raw string to int
foodwatch

Replies: 13
Views: 24745

PostForum: General CCS C Discussion   Posted: Wed Mar 25, 2020 2:56 pm   Subject: Raw Int
Thanks for the sample code. The only problem is that the rawdata received by the uart has no spaces and no commas. Is there another way? Otherwise I can create variables for each of the bytes and d ...
  Topic: Converting raw string to int
foodwatch

Replies: 13
Views: 24745

PostForum: General CCS C Discussion   Posted: Wed Mar 25, 2020 9:13 am   Subject: Converting raw string to int
Here is the raw data as I receive it. I have added a space between bytes for clarity but there is no space sent:

0xFE 0xFE 0x00 0x54 0x00 0x80 0x42 0x16 0x07 0x00 0x00 0x00 0xFD

The first 4 byt ...
  Topic: Converting raw string to int
foodwatch

Replies: 13
Views: 24745

PostForum: General CCS C Discussion   Posted: Tue Mar 24, 2020 8:11 pm   Subject: Converting raw string to int
I have an unusual application. I am reading frequency data from an ICOM receiver. The data comes out of the serial port at 9600. I am using an 18F25k80. I am reading in 11 bytes just fine into a s ...
  Topic: 18F4580 using RA7 as Input
foodwatch

Replies: 2
Views: 5100

PostForum: General CCS C Discussion   Posted: Mon Jun 21, 2010 2:24 pm   Subject: Found it
I found the answer under another topic on the forum. Thanks
  Topic: 18F4580 using RA7 as Input
foodwatch

Replies: 2
Views: 5100

PostForum: General CCS C Discussion   Posted: Mon Jun 21, 2010 2:16 pm   Subject: 18F4580 using RA7 as Input
Does anyone know how to configure the OSC1/RA7 pin as an input in an 18F4580?
  Topic: "unknown device type" error V.3249
foodwatch

Replies: 14
Views: 20723

PostForum: General CCS C Discussion   Posted: Sat Aug 02, 2008 11:15 pm   Subject: "unknown device type" error V.3249
I had a similar problem awhile back with an 18F4550 where the device file had changed. In my case it was when they added the 10 bit a/d provision by allowing ADC = 10. It is a long shot, but be sure ...
  Topic: #serialize with #rom problems
foodwatch

Replies: 0
Views: 3058

PostForum: General CCS C Discussion   Posted: Sat Aug 02, 2008 10:51 pm   Subject: #serialize with #rom problems
I have been having strange problems with the #serialize function and wonder if others may have seen the same thing.... I am using the 18f4550 and the ICDU #serialize method to add serial numbers to th ...
  Topic: PIC18F4220 data eeprom address
foodwatch

Replies: 10
Views: 12952

PostForum: General CCS C Discussion   Posted: Sun Jul 27, 2008 11:08 am   Subject: PIC18F4220 data eeprom address
I use the 18F4550 and the data eeprom begins at 0xf00000. Not sure about yours
  Topic: #serialize question for 18F4550
foodwatch

Replies: 2
Views: 4702

PostForum: General CCS C Discussion   Posted: Wed Jul 16, 2008 10:04 pm   Subject: #serialize question for 18F4550
Thanks for the suggestion... I made the mistake of downloading the latest software for the ICDU and the PWH compiler and now nothing writes to the eeprom no matter which form I choose.

If I use: ...
  Topic: #serialize question for 18F4550
foodwatch

Replies: 2
Views: 4702

PostForum: General CCS C Discussion   Posted: Tue Jul 15, 2008 9:10 pm   Subject: #serialize question for 18F4550
I am trying to use the #serialize function but cannot get it right. I am looking to write a "long" numeric serial number in the internal eeprom locations 1 and 2. I try the below line, but ...
  Topic: ICD-S40 PIC16F877A. Target could not detected
foodwatch

Replies: 2
Views: 24788

PostForum: CCS ICD / Mach X / Load-n-Go   Posted: Fri May 09, 2008 5:26 pm   Subject: ICD-S40 PIC16F877A. Target could not detected
be sure your target is powered from its own supply. This error will occur if your pic is not powered.
  Topic: Is a 3.3 V level converter required for interfacing a 5V PIC
foodwatch

Replies: 11
Views: 14876

PostForum: General CCS C Discussion   Posted: Fri May 09, 2008 4:32 pm   Subject: Is a 3.3 V level converter required for interfacing a 5V PIC
This can be done as follows: Take the 3v output line and connect it thru a 10k resistor to the base of an NPN transistor (ie 2n2222). Tie the emitter to ground. Take the collector through another 1 ...
 
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