Author |
Message |
Topic: Understanding and adapting some functions for CCS |
tonkostz
Replies: 4
Views: 3525
|
Forum: General CCS C Discussion Posted: Sun Jan 12, 2025 4:27 am Subject: Understanding and adapting some functions for CCS |
Thanks!
Would you help me with this code which i am trying to convert from Arduino?
Original Arduino code:
// RDS PS Section
for (uint8_t pslc = 0; pslc < 4; pslc++) // pslc ... |
Topic: Understanding and adapting some functions for CCS |
tonkostz
Replies: 4
Views: 3525
|
Forum: General CCS C Discussion Posted: Fri Jan 10, 2025 9:35 am Subject: Understanding and adapting some functions for CCS |
I need some on coverting some functions from Arduino project to adapt them for CCS compiler.
The first one. I think i understand all here except where i have to define By0, By1, By2...etc?
void send ... |
Topic: I2C scanner code not working on PIC18F4550 |
tonkostz
Replies: 45
Views: 26666
|
Forum: General CCS C Discussion Posted: Fri Jan 03, 2025 12:24 pm Subject: I2C scanner code not working on PIC18F4550 |
Frequency = 76 + 0.05*CHindex. For example 0x252 is 105.7MHz.
You have to write the lower 8 bits 0x52 to register CH and the highest 2 bits 0x02 to register CH_STEP. |
Topic: I2C scanner code not working on PIC18F4550 |
tonkostz
Replies: 45
Views: 26666
|
Forum: General CCS C Discussion Posted: Fri Jan 03, 2025 10:01 am Subject: I2C scanner code not working on PIC18F4550 |
Have you looked this?
https://github.com/gabriel-tenma-white/qn8007_fm_tx/tree/master/sw
This is a whole project for QN8007 and there is a softi2c.h file inside. |
Topic: I2C scanner code not working on PIC18F4550 |
tonkostz
Replies: 45
Views: 26666
|
Forum: General CCS C Discussion Posted: Thu Jan 02, 2025 2:23 am Subject: I2C scanner code not working on PIC18F4550 |
This is my code kust to initiate the chip and make it transmit at a desired frequency (107.30MHz in my case). Note that the frequency is written in two registers: CH (lower 8 bits of the 10 btin chann ... |
Topic: Volume control chip M62429 driver |
tonkostz
Replies: 1
Views: 2550
|
Forum: General CCS C Discussion Posted: Wed Jan 01, 2025 5:15 am Subject: Volume control chip M62429 driver |
I am trying to adapt an arduino driver for a olume control chip M62429 to CCS C compiler but i am not sure i understand this section of the code. Would you help on this?
// Send control word
for ... |
Topic: I2C scanner code not working on PIC18F4550 |
tonkostz
Replies: 45
Views: 26666
|
Forum: General CCS C Discussion Posted: Tue Dec 31, 2024 9:27 am Subject: I2C scanner code not working on PIC18F4550 |
I have finally made it work. It was very simple - just sending data to the chip and it works. Thanks to Ttelmah and all other trying to help.
I've lost too many time thinking it was a standard I2C bu ... |
Topic: I2C scanner code not working on PIC18F4550 |
tonkostz
Replies: 45
Views: 26666
|
Forum: General CCS C Discussion Posted: Sun Dec 29, 2024 2:57 am Subject: I2C scanner code not working on PIC18F4550 |
Here are some oscillograms from different addresses while the I2C scanner program is running. Pull-up resistors are now 2K4 to +3.3V. It seems like the chip is responding to each address or i am wrong ... |
Topic: I2C scanner code not working on PIC18F4550 |
tonkostz
Replies: 45
Views: 26666
|
Forum: General CCS C Discussion Posted: Sat Dec 28, 2024 5:59 am Subject: I2C scanner code not working on PIC18F4550 |
The chip is on the main board and i use a separate small board with the mcu attached to the main board. It is a single device and the wires are about 3cm long between the mcu and the chip.
Here is a ... |
Topic: I2C scanner code not working on PIC18F4550 |
tonkostz
Replies: 45
Views: 26666
|
Forum: General CCS C Discussion Posted: Sat Dec 28, 2024 4:42 am Subject: I2C scanner code not working on PIC18F4550 |
Thanks!
I am still not sure how the I2C scanner code works. After finishing i show address: EE and 112 devices found. I watch this on a LCD and not from the serial port as in the original code. Pleas ... |
Topic: I2C scanner code not working on PIC18F4550 |
tonkostz
Replies: 45
Views: 26666
|
Forum: General CCS C Discussion Posted: Fri Dec 27, 2024 10:36 am Subject: I2C scanner code not working on PIC18F4550 |
SEB is connected to ground - it is low. I2S is only for the audio to the chip on different pins. SDA and SCL are for the 2-wire serial control interface. |
Topic: I2C scanner code not working on PIC18F4550 |
tonkostz
Replies: 45
Views: 26666
|
Forum: General CCS C Discussion Posted: Fri Dec 27, 2024 9:56 am Subject: I2C scanner code not working on PIC18F4550 |
I2S is the Digitial Audio Interface Protocol. Chip can transmit music from USB flash too which communicates on different pins via I2S.
https://i.ibb.co/WBCYM84/1.png
Control is via 2-wire or 3-wir ... |
Topic: I2C scanner code not working on PIC18F4550 |
tonkostz
Replies: 45
Views: 26666
|
Forum: General CCS C Discussion Posted: Fri Dec 27, 2024 4:05 am Subject: I2C scanner code not working on PIC18F4550 |
Update: I have checked with a scope and there are pulses on both pins SDA and SCL during the i2c scanner is running but the program does not find any device. Status never gets "0".
I have m ... |
Topic: I2C scanner code not working on PIC18F4550 |
tonkostz
Replies: 45
Views: 26666
|
Forum: General CCS C Discussion Posted: Thu Dec 26, 2024 3:07 am Subject: I2C scanner code not working on PIC18F4550 |
I have tried the I2C scanner program and it behaves strange. It shows Start and after that ACK with changing addresses in 2 seconds. After some time it stops on address EE and shows I2C: 112 (112 devi ... |
Topic: I2C scanner code not working on PIC18F4550 |
tonkostz
Replies: 45
Views: 26666
|
Forum: General CCS C Discussion Posted: Wed Dec 25, 2024 12:15 am Subject: I2C scanner code not working on PIC18F4550 |
Thanks!
I wonder how the i2c reads/writes can be represented in this way?:
QND_WriteReg(CH_STOP, tS);
Maybe i have to define a function QND_WriteReg somewhere and use it multiple time wit ... |
|