Using incremental encoder to generate 0-359 Degrees Oshonsoft (NOTE: QEI SIM NOT SUPPORTED)

Thread Starter

camerart

Joined Feb 25, 2013
3,830
What is the purpose of this?
Hi J,
"What is the purpose of this" I presume you mean the images of the EPROM? I wondered if this could be used to place the VARIABLE BYTES into a READable memory.

I checked the link you posted in #38, and it looks interesting, but maybe a bit advanced for me:(
C.
 

jjw

Joined Dec 24, 2013
823
Hi J,
"What is the purpose of this" I presume you mean the images of the EPROM? I wondered if this could be used to place the VARIABLE BYTES into a READable memory.

I checked the link you posted in #38, and it looks interesting, but maybe a bit advanced for me:(
C.
All variables are in a readable memory.
Why to but them into Eeprom?
I think you need to understand link#38 or the datasheet of the PIC to setup the slave mode
You asked before about the slave address of PIC18F4431.
It does not exist or needed. Put the data in the SSPBUF and the master reads it by SPIReceive function
 

Thread Starter

camerart

Joined Feb 25, 2013
3,830
All variables are in a readable memory.
Why to but them into Eeprom?
I think you need to understand link#38 or the datasheet of the PIC to setup the slave mode
You asked before about the slave address of PIC18F4431.
It does not exist or needed. Put the data in the SSPBUF and the master reads it by SPIReceive function
Hi I,
The SLAVE address comment was in reply to E's comment in #33.

The EEPROM was if the VARIABLE needed to be placed in a memory, so no good.

I've been using the SPI receive function, with the other SLAVES, and today trying the AZISLAVE, with no result.

I'll try to follow the #38 link better, and keep trying.
Thanks, C.
 

ericgibbs

Joined Jan 29, 2010
21,439
hi C,
This line from jjw.
It does not exist or needed. Put the data in the SSPBUF and the master reads it by SPIReceive function

Is the same as I posted earlier.
When the Master requests the Variable from the Slave, the Slave will send the data to the Master.
The Master does not have to know where the Variable is stored in the Slave.

It is the Slave program that should be programmed, so that data is available in the SSPBUF buffer.

E
 

Thread Starter

camerart

Joined Feb 25, 2013
3,830
hi C,
This line from jjw.
It does not exist or needed. Put the data in the SSPBUF and the master reads it by SPIReceive function

Is the same as I posted earlier.
When the Master requests the Variable from the Slave, the Slave will send the data to the Master.
The Master does not have to know where the Variable is stored in the Slave.

It is the Slave program that should be programmed, so that data is available in the SSPBUF buffer.

E
Hi E and I,
Yes, I've had to go through the thread a few times, I may be getting it now:)
I will start a new thread, here also on ETO. This thread was resolved at #39.
Thanks.
C.
 
Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,830
Hi,
I've come round to this again!
Here's the program from earlier:

Leaving the SPI part out for now, does this simulate? (does POSCOUNT change) (I seem to recall that Oshonsoft doesn't support QEI??) It doesn't simulate for me.

C.
 

Attachments

Thread Starter

camerart

Joined Feb 25, 2013
3,830
Hi,
I've come round to this again!
Here's the program from earlier:

Leaving the SPI part out for now, does this simulate? (does POSCOUNT change) (I seem to recall that Oshonsoft doesn't support QEI??) It doesn't simulate for me.

C.
Hi,
I've tried most of my 18F4431 QEI programs, to see if they work in the SIMULATOR, and I'm pretty sure they don't.
I've changed the TITLE to remind me next time I forget :) Correct me if I'm wrong.

I now find this error 'ALL DIGITAL not supported?
C
 

Attachments

ericgibbs

Joined Jan 29, 2010
21,439
hi C,
As a check try All_Digital [ with the underscore] , that's the way he has shown it in the error message, worth a try.

E
 

ericgibbs

Joined Jan 29, 2010
21,439
[QUOTE [The manual and examples use AllDigital.[/QUOTE]
hi jjw,
In my opinion the 'manuals' leave at lot to be desired, there are errors and omissions.
If you expand the image posted by 'C', the error message clearly states All_Digital , possibly just another error.

I do not know which version of the IDE 'C' is using to get that error, but I do not have a problem compiling any of the earlier 18F4431 programs.

E
 

Thread Starter

camerart

Joined Feb 25, 2013
3,830
Hi E and J,
I updated at the beginning of the month. If I recall there was a reason to update, but I also recall an earlier reason not to update. Perhaps, I'll back track, to the previous version.

Can you SIMULATE the QEI steps so that POSCOUNT increments, with the older version?

EDIT: I uninstalled the NEW program and tried to INSTALL the older one, and now I get this:

C.
 

Attachments

Last edited:

ericgibbs

Joined Jan 29, 2010
21,439
hi C,
Ref your Edit.
Which register file [ that makes you a paid/licensed user did you use when reinstalling the older IDE?

Named: PIC18 simulator............reg

Goto the PC registry folder, Delete the New *.reg and use the earlier old *.reg to register in your PC that you are licensed user,

I hope you have kept a Copy of ALL the Oshonsoft *.reg file.????

E

EDIT:
I would say that you should contact Vlad and ask him why he disallowed ALLDIGITAL in the latest version,??? You have not got what you have paid for.!
 

ericgibbs

Joined Jan 29, 2010
21,439
hi C,
If you need guidance for editing the Reg entry.

1. In the Desktop Search Box type: Reg ,,, the option for Register Editor will pop up, click
the Register will be Displayed.

Use the F2 key and type in Oshonsoft, it will take a while to find the Oshonsoft entries.

2. Right Click on the PIC18.......reg file and choose the Delete option from the pop up menu.

E
 

Attachments

Thread Starter

camerart

Joined Feb 25, 2013
3,830
Hi E,
Thanks for the guides.

I faffed about getting mixed up, for a while, than re-installed the latest program, making sure I had the latest [ REG ] file, in the REGISTER after emptying.

With ALL DIGITAL commented out, it compiles as before, but doesn't SIMULATED, so I'll leave the title as is.

i tried it kind of live and I could get it POSCNT to increment to 358 and 2, so it looks as though it may be working LIVE.

EDIT: I've now got it to count to 5 using wires, so It's working. Next to wire the Incremental counter.

C.
 
Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,830
hi C,
As a check try All_Digital [ with the underscore] , that's the way he has shown it in the error message, worth a try.

E
Hi E,
With UNDERSCORE, no difference. What does ALLDIGITAL do?

Could it be that now 'settings' such as ANSEL are used instead?
C.
 

jjw

Joined Dec 24, 2013
823
What is the version of the IDE you use?
Starting from version 3.59:
"Basic Compiler: Former compiler keywords Adcin, ADC_CLOCK, ADC_SAMPLEUS, AllDigital are now aliases for the new library elements ADC_Read, ADC_Clk, ADC_Sample_uS, All_Digital"

So AllDigital should be ok.
The library stuff looks messy anyway.
http://www.oshonsoft.com/librarysupportpic.php
 

Thread Starter

camerart

Joined Feb 25, 2013
3,830
What is the version of the IDE you use?
Starting from version 3.59:
"Basic Compiler: Former compiler keywords Adcin, ADC_CLOCK, ADC_SAMPLEUS, AllDigital are now aliases for the new library elements ADC_Read, ADC_Clk, ADC_Sample_uS, All_Digital"

So AllDigital should be ok.
The library stuff looks messy anyway.
http://www.oshonsoft.com/librarysupportpic.php
Hi J,
I tried reverting back to an older version, then having failed, now use the present one V3.61

I don't understand what aliases are.

ALLDIGITAL and ALL_DIGITAL are rejected, when compiling.

C.
 
Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,830
Hi,
There are differences in the later versions, some visual and some internal to the programs. How I read it, is that now ALLDIGITAL is not needed any more, as it is automatic.

[ I've just switched to another program on 18F4620 which also uses ALLDIGITAL and with this PIC, ALLDIGITAL is ok. ]

C.
 

Attachments

Last edited:
Top