CONFUSION WITH LOGICATOR VARIABLE vs PICAXE VARIABLES AND LOGICATOR WONT RUN BASIC

JDuthie

New Member
Hello to all

After making some simple PICAXE projects (Home alarm extender module and Gear position indicator for my XTRAIL) I'm now trying to develop a DTMF reader with a 20m2
I plan to use a DTMF decoder card that produces BCD. I need to store the BCD (digits) sequentially up to 22 memory slots. Then be able to read them back

Using Logicator as the development tool seems to have some serious limitations (or it may be my lack of understanding) as follows.

* Initially it took me a while to realise that the "IN" command reads the whole input port, but there is no provision to add a mask %00001111, unless a "basic command" is written and then the logicator sim ignores any 'basic' code included in the logicator flow chart. WHY? It should work according to the blurb.

* The variables in LOGICATOR are A1,2,3,7,BCDEFG etc . and no b0,b1,etc as per the PicAxe Manual which doesn't use upper case variable names. All this is very confusing

* I cant find any method (in Logicator) to store sequential input portC BCD where I can increment the store address and be able to read back later on.

* I think I need a good tutorial on the PICAXE "basic" - the manuals assume a high level of knowledge. any suggestions?
 

nick12ab

Senior Member
Using Logicator as the development tool seems to have some serious limitations (or it may be my lack of understanding) as follows.
You're right - it does have serious limitations.

* Initially it took me a while to realise that the "IN" command reads the whole input port, but there is no provision to add a mask %00001111, unless a "basic command" is written and then the logicator sim ignores any 'basic' code included in the logicator flow chart. WHY? It should work according to the blurb.
What blurb says that BASIC cells are simulated? It says that it isn't in the dialog where you add the BASIC code.

* The variables in LOGICATOR are A1,2,3,7,BCDEFG etc . and no b0,b1,etc as per the PicAxe Manual which doesn't use upper case variable names. All this is very confusing
Anything done in Logicator is converted to BASIC when programming the PICAXE. You can see this code by clicking on the obvious option on one of the menus. So the Logicator variables (A, B, C ,D, E, F, G...) are just the normal variables but renamed. A1, A2, A3... are ADC readings from the ADC pins.

These variables aren't even sequential so they're useless if you want to use the RAM pointer. This is an example of Logicator code, where you can see which Logicator variables are which PICAXE variables:
Code:
'BASIC converted from Logicator for PICAXE flowsheet:
'Flowsheet1
'Converted on 11/10/2012 at 9:33:44

symbol varA = b0
symbol varB = b1
symbol varC = b2
symbol varD = b3
symbol varE = b4
symbol varF = b5
symbol varG = b6
symbol varH = b7
symbol varI = b14
symbol varJ = b15
symbol varK = b16
symbol varL = b17
symbol varM = b18
symbol varN = b19
symbol varO = b20
symbol varP = b21
symbol varQ = b22
symbol varR = b23
symbol varS = b24
symbol varT = b25
symbol timer = time


let dirsC = %00010111


main:
label_1:
high 0
		goto label_1
* I cant find any method (in Logicator) to store sequential input portC BCD where I can increment the store address and be able to read back later on.
PICAXE BASIC supports use of pointers (which is what you need) but Logicator doesn't so you can switch to programming properly in BASIC. I'm not going to recommend use of a BASIC cell as you might as well then do the whole program in BASIC.

* I think I need a good tutorial on the PICAXE "basic" - the manuals assume a high level of knowledge. any suggestions?
See PICAXE Manual 1 and 2.
 

Technical

Technical Support
Staff member
* Initially it took me a while to realise that the "IN" command reads the whole input port, but there is no provision to add a mask %00001111, unless a "basic command" is written and then the logicator sim ignores any 'basic' code included in the logicator flow chart. WHY? It should work according to the blurb.
Simply use an 'in' cell followed by an 'expression' cell to do the mask (A = A & 15). This will then be simulated.
 

JDuthie

New Member
Simply use an 'in' cell followed by an 'expression' cell to do the mask (A = A & 15). This will then be simulated.
.................................................................................................................

Thanks for the response. The info is useful.

My issue with Logicator is the manual states the following.......
"BASIC
This command is used as an
extension to a flowchart.
PICAXE BASIC code can be
typed into the command cell window. When
program flow arrives at this command the
BASIC code within the command will be
interpreted as if it were a procedure."

I'm assuming that basic code written into this will work . It doesn't in my case and maybe I have some basic errors.

And also the variables naming in Logicator 'A,B,C" ETC are different form those in the PICAXE manual 'bo,b1.b2' etc

I dont understand the correlation.

Cheers
 
Top