Author |
Message |
Topic: US2066 Driver. |
daveh
Replies: 2
Views: 14044
|
Forum: General CCS C Discussion Posted: Wed Dec 07, 2022 6:03 am Subject: US2066 Driver. |
http://www.ccsinfo.com/forum/viewtopic.php?t=59920&start=0&postdays=0&postorder=asc&highlight=us2066
I posted driver code here |
Topic: US2066 OLED I2C Driver 04x20 - NHD-0420CW-AB3 |
daveh
Replies: 1
Views: 13045
|
Forum: Code Library Posted: Mon Dec 05, 2022 11:02 am Subject: US2066 OLED I2C Driver 04x20 - NHD-0420CW-AB3 |
The following is code to initialize and use the US2066 OLED display driver using I2C. Code tested on NewHaven Display NHD-0420CW-AB3 display.
#include <33EP512MC504.h>
#FUSES NOWDT ... |
Topic: dsPIC33 I2C Hardware Issue |
daveh
Replies: 41
Views: 113801
|
Forum: General CCS C Discussion Posted: Thu Jan 11, 2018 10:50 am Subject: dsPIC33 I2C Hardware Issue |
I'm sorry, maybe I wasn't clear. If I use the code as shown (which disables the hardware I2C module) then it doesn't beep which indicates the line is high as it should.
If however I comment out th ... |
Topic: dsPIC33 I2C Hardware Issue |
daveh
Replies: 41
Views: 113801
|
Forum: General CCS C Discussion Posted: Wed Jan 10, 2018 1:25 pm Subject: dsPIC33 I2C Hardware Issue |
I guess I'm confused then, if I have the following code it does not beep. If I comment out the first line then it beeps.
When I look with the scope both SDA and SCL are pulled high prior to this p ... |
Topic: dsPIC33 I2C Hardware Issue |
daveh
Replies: 41
Views: 113801
|
Forum: General CCS C Discussion Posted: Wed Jan 10, 2018 12:35 pm Subject: dsPIC33 I2C Hardware Issue |
So apparently when the hardware I2C module is enabled "input(i2c2_SDA)" will always read '0'. #bit I2C2EN_BIT = 0x0216.15 // I2CEN bit to enable/disable hardware I2C module
#define i2c2 ... |
Topic: "Safe" I2C slave address |
daveh
Replies: 6
Views: 15479
|
Forum: General CCS C Discussion Posted: Wed Dec 13, 2017 3:19 pm Subject: "Safe" I2C slave address |
Thanks guys for all your help and insights. The list from adafruit is very helpful. |
Topic: "Safe" I2C slave address |
daveh
Replies: 6
Views: 15479
|
Forum: General CCS C Discussion Posted: Tue Dec 12, 2017 3:50 pm Subject: "Safe" I2C slave address |
Hello, I'm trying to come up with an I2C slave address to use in my product. I'd like to find something that hopefully won't interfere with future sensors I might add.
My initial approach was to ... |
Topic: dsPIC33 I2C Hardware Issue |
daveh
Replies: 41
Views: 113801
|
Forum: General CCS C Discussion Posted: Tue Dec 05, 2017 3:00 pm Subject: dsPIC33 I2C Hardware Issue |
Thanks Ttelmah and temtronic for all your help!
I added this piece of code before my I2C communication to check for and deal with a SDA stuck low fault condition:
#bit I2C2EN_BIT = 0x0216.15 ... |
Topic: dsPIC33 I2C Hardware Issue |
daveh
Replies: 41
Views: 113801
|
Forum: General CCS C Discussion Posted: Tue Dec 05, 2017 10:56 am Subject: dsPIC33 I2C Hardware Issue |
I checked connections again, everything seems good. To verify, I re-loaded my software I2C program and with the same connections I can read valid data from the sensor.
Ok, I think I figured out th ... |
Topic: dsPIC33 I2C Hardware Issue |
daveh
Replies: 41
Views: 113801
|
Forum: General CCS C Discussion Posted: Mon Dec 04, 2017 3:53 pm Subject: dsPIC33 I2C Hardware Issue |
Ok, so this is sort of interesting, so using this as my main:
void main()
{
int ack=0;
set_tris_a(0b1111111111101011);
set_tris_b(0b000000110110 ... |
Topic: dsPIC33 I2C Hardware Issue |
daveh
Replies: 41
Views: 113801
|
Forum: General CCS C Discussion Posted: Mon Dec 04, 2017 2:11 pm Subject: dsPIC33 I2C Hardware Issue |
In my searches I did come across the I2C Scanner Program http://www.ccsinfo.com/forum/viewtopic.php?t=49713&highlight=i2c+scanner which seemed like it could come in handy.
I'm not sure it would ... |
Topic: dsPIC33 I2C Hardware Issue |
daveh
Replies: 41
Views: 113801
|
Forum: General CCS C Discussion Posted: Mon Dec 04, 2017 12:48 pm Subject: dsPIC33 I2C Hardware Issue |
Thanks Ttelmah, I tried adding the delay as you suggested and I'm getting the same thing.
When I unplug the sensor I can see clk/data on the scope. The levels look the same as when I switch to S ... |
Topic: dsPIC33 I2C Hardware Issue |
daveh
Replies: 41
Views: 113801
|
Forum: General CCS C Discussion Posted: Mon Dec 04, 2017 11:59 am Subject: dsPIC33 I2C Hardware Issue |
It's the Honeywell HIH9000 series humidity sensor.
https://sensing.honeywell.com/sensors/humidity-sensors/HIH9000-series
From the data sheet:
Low Level Output voltage = max 20% Vdd
High Level Ou ... |
Topic: dsPIC33 I2C Hardware Issue |
daveh
Replies: 41
Views: 113801
|
Forum: General CCS C Discussion Posted: Mon Dec 04, 2017 10:14 am Subject: dsPIC33 I2C Hardware Issue |
Thanks for your feedback Ttelmah, I'm still having some problems. I tried to simplify the program as basic as possible (see below). When I compile with the FORCE_SW line I can see the clock on B6 a ... |
Topic: dsPIC33 I2C Hardware Issue |
daveh
Replies: 41
Views: 113801
|
Forum: General CCS C Discussion Posted: Fri Dec 01, 2017 12:38 pm Subject: dsPIC33 I2C Hardware Issue |
I'm having trouble with Hardware I2C on a dsPIC33EP512GP502
Compiler v5.075
Based on other forum discussions I was trying to use
#pin_select SCL2OUT = PIN_B6
#pin_select SCL2IN = PIN_B6
#pi ... |
|