Page 21 of 23
Re: PIC18F25K22 UART ERROR
Posted: Sun Sep 08, 2024 8:46 am
by SILVESTROS
Hi,
First the Scotland sun !! The job can wait..
The problem is that I need an extra pin for Analog input for transmitter and a DAC OUT for receiver ..so, I'll try to retain PIC12F1822 at transmitter changing the connections as follows
Transmitter
PIC12F1822 NRF24LO1
A.0 MOSI
A.2 MISO
A.1 SCK
A.3 CS/SS
A.5 CE
A.4 Analog IN
Save and debug OK, so I can program the chip.
About receiver , I can't use above chip, but I have a PIC16F18313. I'll try to find if it's possible to make the connections , cause I need an extra pin
for DAC OUT.
Regards
Basil
Re: PIC18F25K22 UART ERROR
Posted: Sun Sep 08, 2024 9:14 am
by chipfryer27
Hi
I think you might have issues with the above connections as although you can set MCLR as internal (A.3), the pin then becomes a digital input.
However you may get away with not using the CS/SS pin at the MCU at all. This pin is necessary when you have multiple devices connected via SPI to let a particular device know that the comms are meant for it. As you only have one device, the transceiver, all comms will be for it so you could just hold that pin low on the transceiver itself.
Hope this helps.
Regards
Re: PIC18F25K22 UART ERROR
Posted: Sun Sep 08, 2024 5:01 pm
by chipfryer27
Hi
Using your Tx chip, 1822, I modified the WiKi Tx example and excluded the CS/SS pin (unconnected in properties). This compiled to Hex OK but can't guarantee it will actually work as maybe something within FC itself won't like the unused parameter.
Regards
Re: PIC18F25K22 UART ERROR
Posted: Sun Sep 08, 2024 5:50 pm
by SILVESTROS
Hi,
Thanks for info.
I'll make corrections to hardware and test if it works.
The demo codes that I was posted for first converter (AN to SPI / SPI to AN ) is ok (except of course of pin connections ) ? so after selection of PIC and pin remapping at properties , to make some tests. I think that there is no problem with unused SS pin.
Regards
Basil
Re: PIC18F25K22 UART ERROR
Posted: Sun Sep 08, 2024 9:35 pm
by SILVESTROS
Hi,
I hope that is the last update ..I use SS in both pair. Something for that I'm confused ,is connection MOSI, MISO between PIC and NRF...The correct is MISO-----MISO /
MOSI------MOSI or MOSI------MISO / MISO------MOSI ?
I've seen both connections ways in many examples.
Regards
Basil
Re: PIC18F25K22 UART ERROR
Posted: Fri Sep 13, 2024 8:02 am
by SILVESTROS
Hi,
I made some corrections to hardware according to previous schematics . After that I was tried to programming PiC for transmitter/receiver...programming PIC12F1822 with PICKIT3 ok..PIC16F18313 not support by PICKIT3 , so I get a new PICKIT5 .Using MPLAB X v.6.20 , I have no connect with PIC...Connection PICKIT5 and PC is ok with PORT7...I was tried to reset PICKIT5 with boot recovery ,but I get following message.
Boot recovery restoration was unsuccessful.
Error Invalid selection (114).
After that blue strip light is off..
At a new attempt to use that tool I get a message..
Error.
.Already initialized (149).
Any idea on how to get ready pICKIT5?
Thanks in advance
Basil
Re: PIC18F25K22 UART ERROR
Posted: Fri Sep 13, 2024 10:10 am
by chipfryer27
Hi
In the schematic for your 1822 you have A3 as SS. When you set the chip to use internal MCLR the pin can then be an input but not an output. If you leave it disconnected or perhaps tie it and the SS on chip to 0v then it should work OK.
Same with the 18313, the pin A3 can only be an input. Again as you are just communicating with the transceiver you could perhaps swap CE on pin A3 with SS on pin A1, and then tie SS on A3 to Ov.
Sorry, can't help with the Pickit as I use the Multiprogrammer from Matrix.
Regards
Re: PIC18F25K22 UART ERROR
Posted: Fri Sep 13, 2024 8:56 pm
by SILVESTROS
Hi,
You've right about A.3, I didn't noticed that...Tomorrow I'll make corrections and test the code for receiver/transmitter.
About programmer for PIC, I was found solution , so I'm ready for programming.
Many thanks.
Regards
Basil
Re: PIC18F25K22 UART ERROR
Posted: Sat Sep 14, 2024 7:17 pm
by chipfryer27
Hi
I'm possibly going to my "Evil Lab" tomorrow, but not confirmed. Whilst I don't have any of your PIC's I do have others that I could test Tx-Rx using the RF modules with CS/SS held Low on module, if you think it could help.
Regards
Re: PIC18F25K22 UART ERROR
Posted: Sat Sep 14, 2024 8:42 pm
by SILVESTROS
Hi
I was tested TX-RX pairs with no result.. I noticed that have no current when I connect power to NRF24L01/PIC at both transmitter / receiver hardware. I can't find something wrong in circuit , but why not work the NRF ?...Maybe RF modules are defect ..
I would like, if you can ,to test RX/TX circuits with any other chip you have, and send me demo codes to check if there are errors at mine. It will help me a lot.
Regards
Basil