Author |
Message |
Topic: pic to pic with LoRa |
webgiorgio
Replies: 7
Views: 31002
|
Forum: General CCS C Discussion Posted: Mon Dec 27, 2021 12:52 pm Subject: pic to pic with LoRa |
Hi,
I want to send a string from one PIC to a second PIC, wirelessly using two radio modules RFM95W.
The radio module has SPI interface, with so many registers to set that I feel lost. https://www. ... |
Topic: PIC16F1789 won't program at 3.3V, but programs at 5V |
webgiorgio
Replies: 2
Views: 24104
|
Forum: CCS ICD / Mach X / Load-n-Go Posted: Wed Nov 10, 2021 2:12 pm Subject: PIC16F1789 won't program at 3.3V, but programs at 5V |
How can I disable "block erase"?
I read that the chip can be programmed at 3.3V using a "normal erase" of the memory rather than "block erase". |
Topic: pic i2c slave is "not found" |
webgiorgio
Replies: 17
Views: 55117
|
Forum: General CCS C Discussion Posted: Wed Nov 10, 2021 8:57 am Subject: pic i2c slave is "not found" |
CCS support gave me the solution
The issue is that version 5.034 is incorrectly setting the SDISEL bit in the APFCON1 register, and that is causing it not to work. This issue was fixed ... |
Topic: pic i2c slave is "not found" |
webgiorgio
Replies: 17
Views: 55117
|
Forum: General CCS C Discussion Posted: Tue Nov 09, 2021 9:21 am Subject: pic i2c slave is "not found" |
Here is the code I modified according to the suggestions,
It doesn't work.
/*
i2c slave
*/
#include <16F1789.h>
#fuses INTRC_IO, NOLVP, PUT, NOPROTECT //INTRC_IO to be able to use A7 ... |
Topic: pic i2c slave is "not found" |
webgiorgio
Replies: 17
Views: 55117
|
Forum: General CCS C Discussion Posted: Tue Nov 09, 2021 4:07 am Subject: pic i2c slave is "not found" |
It works with the file compiled by PCM programmer!
With my compiler version it does not enter the ssp_interrupt() (no Led toggle), so the code inside does not matter.
I think I will downl ... |
Topic: pic i2c slave is "not found" |
webgiorgio
Replies: 17
Views: 55117
|
Forum: General CCS C Discussion Posted: Mon Nov 08, 2021 3:43 am Subject: pic i2c slave is "not found" |
Hi,
thanks for investigating.
Are those differences something that I can fix in my source code? How?
Could you send the .hex file of the slave, to test? |
Topic: pic i2c slave is "not found" |
webgiorgio
Replies: 17
Views: 55117
|
Forum: General CCS C Discussion Posted: Sun Nov 07, 2021 2:03 pm Subject: pic i2c slave is "not found" |
I did more testing. I removed the ESP32 to take a variable out of the question.
I wired up two PIC16F1789, 5V, one as a slave, and one as i2c scanner.
The scanner works, as I can detect a i2c displa ... |
Topic: pic i2c slave is "not found" |
webgiorgio
Replies: 17
Views: 55117
|
Forum: General CCS C Discussion Posted: Sun Nov 07, 2021 4:25 am Subject: pic i2c slave is "not found" |
To my understanding the R/W bit is the LSB.
So if A0 is the read address, A1 is the write address.
The i2c scanner program on the ESP32 is using a "for" loop where the address is increment ... |
Topic: pic i2c slave is "not found" |
webgiorgio
Replies: 17
Views: 55117
|
Forum: General CCS C Discussion Posted: Sat Nov 06, 2021 3:40 pm Subject: pic i2c slave is "not found" |
I tested the PIC as a master with a slave i2c display. It works. So my hardware is ok, even though I tested it at 5V, while my slave application need to work at 3.3V.
I read that working at 3.3V coul ... |
Topic: pic i2c slave is "not found" |
webgiorgio
Replies: 17
Views: 55117
|
Forum: General CCS C Discussion Posted: Sat Nov 06, 2021 1:36 pm Subject: pic i2c slave is "not found" |
I tried also with SMBUS as advised here:
http://www.ccsinfo.com/forum/viewtopic.php?p=191024#191024
I lowered the address to 0x33 (i2c scanner goes to 127 max).
I checked the solder joints on the P ... |
Topic: pic i2c slave is "not found" |
webgiorgio
Replies: 17
Views: 55117
|
Forum: General CCS C Discussion Posted: Sat Nov 06, 2021 1:02 pm Subject: pic i2c slave is "not found" |
Hi,
I have a PIC16F1789 (slave) connected with i2c to a ESP32.
Both running at 3.3V.
2.2k pull-ups on i2c.
Compiler 5.034.
On the ESP32 I have a i2c scanner code, which works (if I add a i2c ... |
Topic: PIC16F1789 won't program at 3.3V, but programs at 5V |
webgiorgio
Replies: 2
Views: 24104
|
Forum: CCS ICD / Mach X / Load-n-Go Posted: Sat Nov 06, 2021 11:00 am Subject: PIC16F1789 won't program at 3.3V, but programs at 5V |
Hi,
I have a PIC16F1789 that I want to operate at 3.3V (as there will be other 3.3V devices in the circuit).
I can program it at 5V (Vcc), and then it will run at 3.3V (Vcc) (simple blinking LED).
... |
Topic: multisource project overwritten by IDE |
webgiorgio
Replies: 1
Views: 12452
|
Forum: General CCS C Discussion Posted: Thu May 06, 2021 2:59 am Subject: multisource project overwritten by IDE |
Hi,
I use to organize my projects in multiple files like:
- main.ccsprj
- main.c
- variables.c
- functions.c
- serial.c
- defin.c
And use folders to organize the projects and versions like ... |
Topic: Modbus kbhit() not triggering |
webgiorgio
Replies: 24
Views: 62212
|
Forum: General CCS C Discussion Posted: Thu Feb 25, 2021 3:46 pm Subject: Modbus kbhit() not triggering |
It works also with the MAX485.
Thanks for the help!
One more thing I can do with PIC rather than Arduino compatible chips.
To only use one pin to control the direction:
//#define MODBUS ... |
Topic: Modbus kbhit() not triggering |
webgiorgio
Replies: 24
Views: 62212
|
Forum: General CCS C Discussion Posted: Tue Feb 23, 2021 5:58 pm Subject: Modbus kbhit() not triggering |
We have a solution, thanks to a hint from CCS support.
The parity!!!
My PC was set to None, but the default for the modbus library is to Odd.
So, setting it to Odd was enough to make it ... |
|