Picaxe28X-1 I/O Assignments

paul.webster

New Member
Hi, I have just started to look at Logicator. I am playing with a project where I use PortB as outputs and some of PortC as inputs.

In Logicator it appears that PortC pins are only defined as inputs. Is the developer intending to fix this?

I thought Logicator would be good for program development and logical concepts for some students struggling with their picaxe basic.

Look forward to your feedback.
 

Tricky Dicky

Senior Member
Port C as outputs in Logicator

Hi Paul

You can assign port c pins as outputs in Logicator. Unfortunetly you have to use the Basic command to do it. At the point in your program where you need port c as outputs insert a basic cell and type the following let dirsc = %11111111 if you require all the pins as outputs. If you only need certain pins as outputs leave the ones you do not need as zeros.

To use the assigned pins as outputs you will need to use the Basic command again typing in the following let pinsc = %11111111 or whatever combination of outputs you need.

I can send you a sample of a flowchart from one of my past pupils, contact me over the private messaging service.

Richard
 

paul.webster

New Member
Picaxe28x1 PortC I/O

Dear Richard,

Thank you for your reply. I created a small project where I use 4 bits of PortC as Outputs to multiplex some displays sitting on PortB. I am happy for me to use the Picaxe Editor, however I thought that Logicator was a really good tool for students to develop Logical and programming concepts. Its nice to see all development simulate correctly. Its shame that for a little effort features like PortC i/o, 10bit ADC, and sertxd could work for Picaxe28x1.

I like the environment so I will use it and work around the bugs.

Thanks again.

Paul

Hi Paul

You can assign port c pins as outputs in Logicator. Unfortunetly you have to use the Basic command to do it. At the point in your program where you need port c as outputs insert a basic cell and type the following let dirsc = %11111111 if you require all the pins as outputs. If you only need certain pins as outputs leave the ones you do not need as zeros.

To use the assigned pins as outputs you will need to use the Basic command again typing in the following let pinsc = %11111111 or whatever combination of outputs you need.

I can send you a sample of a flowchart from one of my past pupils, contact me over the private messaging service.

Richard
 

Technical

Technical Support
Staff member
features like PortC i/o, 10bit ADC, and sertxd could work for Picaxe28x1.

I like the environment so I will use it and work around the bugs.
Logicator flowcharts contain a 'subset' of the available PICAXE commands deliberately, because it is a simpler application designed for school children. Therefore, as an example, items such a 10bit ADC are not included by design because Logicator only works with 'byte' level variables, which is the level most school projects work at.

If an advanced command that is not a default Logicator feature is required, simply use the BASIC cell as already suggested.
 

Tricky Dicky

Senior Member
Logicator workarounds

Hi Paul

I have to say I agree in part with both you and Technical about Logicator. Technical's point that the environment is designed for use by school children means it has to be simple to use and as a result some advanced features need to be left out and the Basic command is usually the answer to most problems but it can become a pain if you have to use it extensively in a program.

I use Logicator for GCSE project work because it is very intuitive the students soon pick it up and can often easily spot where mistakes have occured, much easier than going though a long list of Basic. Other teachers on this forum prefer Programme Editor and Basic programming. Myself I cannot find the time to include a course in Basic programming alongside everything that needs to be covered in our GCSE specification.

I do believe future versions of Logicator should include a means of pin assignment to enable some of the larger and advanced PICAXEs to be better exploited. Too often my pupils have researched components such as the PICAXE looked at the pinout diagrams to find out that you can have x number of inputs or outputs only to find out that is not the case if you intend to use Logicator. You are able to assign input/output pins on the PICAXE 08M, surely the same can be done for other PICAXEs where pins can be assigned in Basic.

An example of the sort of workarounds are the program I was offering. The student required to control 16 LEDs individually. He achieved that by using the Basic command as outlined in my previous post. The problem was that he wanted to include 3 subroutines that turned on these LEDs in different patterns, that was OK. Each subroutine would be chosen with a push switch. Using the Decision command was a problem because it only input through Port B and this was now all outputs. The workaround was to use the Decision commands,but convert the flowchart to basic and insert the Basic term "porta" in the the IF - Then statements that Logicator had converted the decision cells to. This enabled him to connect his push switches to Port A, down loading the ammended Basic listing instead of the flowchart got his circuit working as desired.

If Technical is reading this can I ask if the Logicator manual could be more regularly updated it often lags behind the new features included in Logicator upgrades. There are commands in Vers. 3.4.1 that are not documented. Ta!

Regards
Richard
 
Top