Author |
Message |
Topic: ds1307 bcd to decimal why add 48? |
akay
Replies: 6
Views: 19450
|
Forum: General CCS C Discussion Posted: Sat Nov 07, 2020 5:14 am Subject: ds1307 bcd to decimal why add 48? |
thank u your valuable message..
so what can i do for fix this code?
could you pls help me to fix? |
Topic: ds1307 bcd to decimal why add 48? |
akay
Replies: 6
Views: 19450
|
Forum: General CCS C Discussion Posted: Fri Nov 06, 2020 4:57 pm Subject: ds1307 bcd to decimal why add 48? |
i know this is not related in this topic, but there is an issue i cannot solve..
when i push "asagi" (enter to switch menu) the numbers are mixed up and the program freezes...
it works n ... |
Topic: ds1307 bcd to decimal why add 48? |
akay
Replies: 6
Views: 19450
|
Forum: General CCS C Discussion Posted: Fri Nov 06, 2020 6:46 am Subject: ds1307 bcd to decimal why add 48? |
hello everyone
The code I have shown below is the part of the conversion from bcd to decimal to ds1307..
Why did we add 48 after converting bcd to binary code?
timefor example: second is bcd 48
... |
Topic: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
akay
Replies: 23
Views: 55983
|
Forum: General CCS C Discussion Posted: Thu Nov 05, 2020 10:43 am Subject: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
You said you had changed the BME280_I2C_ADDRESS. The point is this needs
to be 0xEC for a bme280 (7bit) address of 0x76, or 0xEE for a bme280
address of 77.
0x76 & 77, won't work. The address ... |
Topic: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
akay
Replies: 23
Views: 55983
|
Forum: General CCS C Discussion Posted: Thu Nov 05, 2020 5:14 am Subject: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
Those are 7-bit i2c addresses. CCS uses 8-bit addresses.
Multiply them by 2 to convert them to 8-bit:
0x76 x 2 = 0xEC
0x77 x 2 = 0xEE
I don't understand. What can i do? Could you pls explai ... |
Topic: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
akay
Replies: 23
Views: 55983
|
Forum: General CCS C Discussion Posted: Wed Nov 04, 2020 1:45 pm Subject: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
It's work but my sensor is ''gy-bme280-3.3''. i2c address 0x77 when connect the SDO to Vcc to select i2c 0x77. I changed to i2c address of driver but it not work. |
Topic: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
akay
Replies: 23
Views: 55983
|
Forum: General CCS C Discussion Posted: Wed Nov 04, 2020 1:02 pm Subject: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
I just tested to compile the bme280.c driver with 877a. You need to add #separate directives to either _bme280_compensate_P_int32() or _bme280_compensate_H_int32() functions, or both.
Like this:
# ... |
Topic: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
akay
Replies: 23
Views: 55983
|
Forum: General CCS C Discussion Posted: Wed Nov 04, 2020 12:53 pm Subject: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
Thank you for your valuable comments my friend. |
Topic: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
akay
Replies: 23
Views: 55983
|
Forum: General CCS C Discussion Posted: Wed Nov 04, 2020 7:30 am Subject: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
i'd like to say that when I try with other drivers, i dont see these mistakes.. for example Bmp085 and bmp180 drivers are almost the same.. i was working with bmp085 driver before the bmp180 driver c ... |
Topic: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
akay
Replies: 23
Views: 55983
|
Forum: General CCS C Discussion Posted: Wed Nov 04, 2020 7:17 am Subject: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
i get this error too.. i m using 5.076 version.. i didnt compile with 16f877a ..i also have the same problem with the bmp180 driver. i am giving up.. |
Topic: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
akay
Replies: 23
Views: 55983
|
Forum: General CCS C Discussion Posted: Tue Nov 03, 2020 8:54 am Subject: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
You could easily have a basic hardware problem...
That PIC is designed to run on 5 volts, the BME280 sensor only 3 volts (most peripherals are 3 volts these days). You do need 'logic level conversion ... |
Topic: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
akay
Replies: 23
Views: 55983
|
Forum: General CCS C Discussion Posted: Mon Nov 02, 2020 5:14 pm Subject: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
Notice that the definition of the function shows that you must pass it
a pointer to a signed int32.
bme280_get_temperature(signed int32 *pTemp)
That means you pass it the address of the int32.
Do ... |
Topic: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
akay
Replies: 23
Views: 55983
|
Forum: General CCS C Discussion Posted: Mon Nov 02, 2020 4:33 pm Subject: bme 280 problem? HOW CAN I READ TEMP OR PRESSURE VALUE? |
I wrote a simple code to read temperature with bme280 sensor .. but it couldnt work? please somebody help me about that.. #define LCD_RS_PIN PIN_B1
#define LCD_RW_PIN PIN_B2
# ... |
Topic: Radical olympic++ ADC averaging , de-noising routine |
akay
Replies: 30
Views: 185711
|
Forum: Code Library Posted: Thu Oct 01, 2020 1:27 am Subject: Radical olympic++ ADC averaging , de-noising routine |
the function is not "void" -
it merely requires no data to be passed to it.
Surely you understand that, right?
it returns the value of the processed a/d readings,
following the 'ol ... |
Topic: Radical olympic++ ADC averaging , de-noising routine |
akay
Replies: 30
Views: 185711
|
Forum: Code Library Posted: Wed Sep 30, 2020 6:38 pm Subject: Radical olympic++ ADC averaging , de-noising routine |
Not sure what you are getting at.
The result is implied in the function call.
I did not mention an LCD display -
unsigned int16 adchlx(void)
It returns an unsigned int16 on exit as in
... |
|