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 96 matches
CCS Forum Index
Author Message
  Topic: I2C on PIC12F1840 does not work on 3.3V
Futterama

Replies: 18
Views: 35063

PostForum: General CCS C Discussion   Posted: Tue Feb 21, 2017 2:03 pm   Subject: I2C on PIC12F1840 does not work on 3.3V
Test program with compiler 5.042:

test.h
#include <12F1840.h>

#FUSES NOWRT // Program memory not write protected
#FUSES INTRC_IO // Internal RC Osc, no CLKOUT
#fuses NOWDT ...
  Topic: I2C on PIC12F1840 does not work on 3.3V
Futterama

Replies: 18
Views: 35063

PostForum: General CCS C Discussion   Posted: Tue Feb 21, 2017 1:24 am   Subject: I2C on PIC12F1840 does not work on 3.3V
I will grab some scope shots tonight and try to explain what it is that I see when it stops working.

Why additional pull-ups? Because of the 10k in the Cypress master device.

Why not the LF vers ...
  Topic: I2C on PIC12F1840 does not work on 3.3V
Futterama

Replies: 18
Views: 35063

PostForum: General CCS C Discussion   Posted: Sun Feb 19, 2017 3:18 am   Subject: I2C on PIC12F1840 does not work on 3.3V
Well, then the Cypress device has 10k pull-ups and the STM device has 1k1 pull-ups. Both devices pull to 3.3V as documented.
  Topic: I2C on PIC12F1840 does not work on 3.3V
Futterama

Replies: 18
Views: 35063

PostForum: General CCS C Discussion   Posted: Sun Feb 19, 2017 1:56 am   Subject: I2C on PIC12F1840 does not work on 3.3V
Why not just put an amp meter directly between GND and SDA/SCL?
  Topic: Use bytes from array as int16 and int32
Futterama

Replies: 3
Views: 10683

PostForum: General CCS C Discussion   Posted: Sat Feb 18, 2017 3:15 pm   Subject: Use bytes from array as int16 and int32
Thanks!
  Topic: Use bytes from array as int16 and int32
Futterama

Replies: 3
Views: 10683

PostForum: General CCS C Discussion   Posted: Sat Feb 18, 2017 2:55 pm   Subject: Use bytes from array as int16 and int32
Hi,

I receive some chars over RS232 and save those in a byte array.

Some of the data is a int16 (2 bytes) and some is a int32 (4 bytes).

How can I access the bytes in the array as int16 and i ...
  Topic: I2C on PIC12F1840 does not work on 3.3V
Futterama

Replies: 18
Views: 35063

PostForum: General CCS C Discussion   Posted: Sat Feb 18, 2017 2:45 pm   Subject: I2C on PIC12F1840 does not work on 3.3V
The master is definitely 3.3V, the documentation says so, so does my scope.
  Topic: I2C on PIC12F1840 does not work on 3.3V
Futterama

Replies: 18
Views: 35063

PostForum: General CCS C Discussion   Posted: Sat Feb 18, 2017 12:39 pm   Subject: I2C on PIC12F1840 does not work on 3.3V
The master is either a Cypress MCU or a STM MCU, I have devices with both. I don't know more than this, the devices are too expensive to void warranty by pulling them apart to check.
  Topic: I2C on PIC12F1840 does not work on 3.3V
Futterama

Replies: 18
Views: 35063

PostForum: General CCS C Discussion   Posted: Sat Feb 18, 2017 12:10 pm   Subject: I2C on PIC12F1840 does not work on 3.3V
Hi PCM programmer,

You are correct with the voltage levels, I didn't notice that option for the #use statement.

But that still prohibits me from adding pull-up resistors unless I also include a ...
  Topic: I2C on PIC12F1840 does not work on 3.3V
Futterama

Replies: 18
Views: 35063

PostForum: General CCS C Discussion   Posted: Sat Feb 18, 2017 8:35 am   Subject: I2C on PIC12F1840 does not work on 3.3V
Hi temtronic,

Thanks for your reply.

The master device is a RC receiver with built-in telemetry system which can be accessed by the I2C connection.

I checked the datasheet, all the other peri ...
  Topic: I2C on PIC12F1840 does not work on 3.3V
Futterama

Replies: 18
Views: 35063

PostForum: General CCS C Discussion   Posted: Sat Feb 18, 2017 7:42 am   Subject: I2C on PIC12F1840 does not work on 3.3V
Hi,

I have a PIC12F1840 configured as an I2C slave using the I2C hardware on pins RA1 and RA2.
The I2C master device runs 3.3V and I2C clock is 100kHz. The master has built-in pull-ups but I don't ...
  Topic: CCS handling of int16 in if statement
Futterama

Replies: 16
Views: 30238

PostForum: General CCS C Discussion   Posted: Sat Jul 23, 2016 9:01 am   Subject: CCS handling of int16 in if statement
Followup on this thread. I succeeded in making my code do the loop in exactly the same amount of time +/- 100ns according to my scope.

The way I did it was to clear Timer0 at the very beginning of ...
  Topic: CCS handling of int16 in if statement
Futterama

Replies: 16
Views: 30238

PostForum: General CCS C Discussion   Posted: Tue Jul 19, 2016 4:23 am   Subject: CCS handling of int16 in if statement
RF_Developer, thanks, I actually already did that, and it will actually fit my code flow better that way Smile
  Topic: CCS handling of int16 in if statement
Futterama

Replies: 16
Views: 30238

PostForum: General CCS C Discussion   Posted: Mon Jul 18, 2016 12:27 pm   Subject: CCS handling of int16 in if statement
Ttelmah, thanks, I will do that.

Now, can we do something similar with the following statement?

if((InputPin) && (Some_int8_value > 0))

I think the ASM code ...
  Topic: CCS handling of int16 in if statement
Futterama

Replies: 16
Views: 30238

PostForum: General CCS C Discussion   Posted: Mon Jul 18, 2016 11:33 am   Subject: CCS handling of int16 in if statement
Is there a clever way to compare two int16 where the execution
time remains the same regardless of variable content?
If you XOR the 16-bit values, the compiler will first XOR the LSB's then
XOR th ...
 
Page 1 of 7 Goto page 1, 2, 3, 4, 5, 6, 7  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group