Remote control by location (PIC in Oshonsoft)

trebla

Joined Jun 29, 2019
599
You can view this revision number in IPE output window. After connecting to PIC last two lines are something like :

Target device PIC12F1822 found.
Device ID Revision = 9

In your case there are of course different numbers.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
You can view this revision number in IPE output window. After connecting to PIC last two lines are something like :

Target device PIC12F1822 found.
Device ID Revision = 9

In your case there are of course different numbers.
Hi T,
Today MPLAB has decided not to work. I've tried uninstalling Mplab and compouter OFF/ON, nothing!
I have 2x Pickit3 and a 2. Pickit3-2 IPEs both work, so I can still program, until I get Mplab to work again. (I find it big and clumsy)
Pickit3 show 371F, as checksum, but I don't think that's what you're asking.
C
 

trebla

Joined Jun 29, 2019
599
The checksum is probably for loaded code. I don't know about PICkit3 interface, is it capable to show device ID or not. IMO the PICkit3 works better with MPLAB than with PICkit3 programmer inteface. The old PICkit2 + PICkit2 programmer interface works perfectly together.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
You can view this revision number in IPE output window. After connecting to PIC last two lines are something like :

Target device PIC12F1822 found.
Device ID Revision = 9

In your case there are of course different numbers.
Hi T,
I now have Mplab IDE 8.91. I will see how it all work, but I kind of prefere the simpler programmers.
Aanswer: Device ID Revision = 0000000c
C
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
I try figure out why slave sends dummy buffer content after each two bytes transmitted by master. It will take a while, maybe some other with more confident with Oshonsoft BASIC will answer faster.
Hi T,
As I understand it, the MASTER and SLAVE swap each BYTE in turn. 2x BYTEs is an error somewhere. I'm trying to remember how it all works.
C
C
 

LesJones

Joined Jan 8, 2017
4,511
I assume that the "C" program is basically a text file. If so then just make a copy of the file and then change it's extension to .txt (From what was probably .c)

Les.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
I assume that the "C" program is basically a text file. If so then just make a copy of the file and then change it's extension to .txt (From what was probably .c)

Les.
Hi L,
I'm using BASIC as my language, and the text file is .TXT from notepad. when I post it, it gets crossed out
C
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
hi C,
Try using mybasic.bas.txt to upload.
The reader then just deletes the .txt extension.
E
Hi E,
Somehow, it spot that it was a BASIC program and doesn't like it, so I alway copy and paster the program into a text.txt file and post that, but since yeaterday, this gets rejected.

If I can ask you a question about porgamming?
The message 'MSG1' is being sent through the buffer, but it is text 'msg1 = "1234" + Cr + Lf'
How do I send data instead?
C
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
hi C,
Do you mean a numeric value rather than an ASCII string value.?

E
Hi E,
If 'say' I READ a peripheral, and it gives me a BYTE, I now want to pass it to the second PIC as a BYTE, this is what I would like to use SPI between the PICs for.
C
 

LesJones

Joined Jan 8, 2017
4,511
Try using code tags. Select all of the text in notepad, Then copy the text using either right mouse click and select copy from the drop down box OR copy it using control + c keys. Then paste it into between the code tags using control + v keys.

Les.
 

ericgibbs

Joined Jan 29, 2010
21,452
hi C,
The SPI transfer does not care what the single Byte type is, it is a Bit by Bit transfer exchange of 8 Bits.

Are you having a SPI xfer problem.?
E
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
Try using code tags. Select all of the text in notepad, Then copy the text using either right mouse click and select copy from the drop down box OR copy it using control + c keys. Then paste it into between the code tags using control + v keys.

Les.
Hi L,
Ah yes, I remember, like this?
That didn't work either.
C
 

Attachments

Thread Starter

camerart

Joined Feb 25, 2013
3,836
hi C,
The SPI transfer does not care what the single Byte type is, it is a Bit by Bit transfer exchange of 8 Bits.

Are you having a SPI xfer problem.?
E
Hi E,
I think it's all been explained before in past programs, which I'll dig into and try to untangle, see what happens;)
C.
 

trebla

Joined Jun 29, 2019
599
Device ID Revision = 0000000c
This points to revision B5 and there i don't see any hardware problems affecting your design (There are some related to UART but have workarounds).

Good to hear you sorted out SPI problems :) It will be interesting to me compare old and new code for future references.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
This points to revision B5 and there i don't see any hardware problems affecting your design (There are some related to UART but have workarounds).

Good to hear you sorted out SPI problems :) It will be interesting to me compare old and new code for future references.
Hi T,
I think the only changes I made were commenting in lines that were commented out, e,g, Wait/while.
C.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
hi C,
The SPI transfer does not care what the single Byte type is, it is a Bit by Bit transfer exchange of 8 Bits.

Are you having a SPI xfer problem.?
E
Hi ,
I've been searching through past programs, and I don't think transfering BYTEs has been covered, apart from READ peripheral DATA, and SEND RECEIVE digits.

If someone could describe how to do it please, I would be grateful.

Meanwhile, I'll keep trawling in case it has been covered.
C
 

trebla

Joined Jun 29, 2019
599
In your existing code you send string data by one byte. One byte or char can hold decimal value 0-255. Unsigned integer type (in PicBasic PRO named WORD) of data (usually is two bytes long) holds 0-65535, in PicBasic PRO exist also LONG type which is 4 bytes long and holds +/- 2million. This means you can send any value trough SPI by one byte using same method you sent the byte array (string).
 
Top