Which is better. Flowcharting or Coding

dbarry722

Member
Hi Folks.

I've been speaking to our Technology Department about programming PICs and there seems to be an opinion that the Flowcharting method is the preferred way to go now.

What are peoples opinions? Should I stick with learning basic or should I go the flowcharting route or a mixture of both.

Currently they use Circuit Wizard to design and flowchart the circuit whereas two programs - Programming Editor and Logicator are used here

Declan
 

pete20r2

Senior Member
With BASIC, it really doesn't matter.
An efficient flow chart will just get converted into efficient basic which will then get converted into rubbish assembly.
You can't get around that.
Main points for each:
Flowchart:
Clear thought process.
Basic commands are still viewable.
Gets converted to basic anyway.

Text Basic Programming:
Pro
More rapid coding (if time is an issue)
If layed out and commented, can be very followable. (Wan't expecting that to be a real word:D)
It's easy enough (it is called BASIC, you know why?)

Personal preference really, I personally only use the text. Don't get stuck in flowcharting, if you want to progress in uC's then you need to understand how to structure a program and just bash it out on your keyboard.
 

Technical

Technical Support
Staff member
Around 80-90% of schools use Logicator and flowcharts.
The majority of 'hobbyists' on this forum use BASIC, so forum relies here will probably not reflect what most schools use!
 

westaust55

Moderator
With the PICAXE system as with some other forms of BASIC the code typed is not converted to assembler.
The PICAXE chips contain a firmware program that is used to download the users program and interpret that program- a process which makes the program run slower than if written in assembler.
The users BASIC program the user types is converted to tokens so that 1 token which occupies around 5 or 6 bits occupies minimal space compared to a multi character key word.

Assembly language is far from rubbish and although more difficult to initially learn and is processor specific will typically result in the most efficient/ compact code with the highest operating speed.
 

pete20r2

Senior Member
I certainly did not mean that Assembler is a bad language, It's the native language of the processor, what I meant is that any basic program will convert to an inefficient machine code, in the compiler or on chip.
 

westaust55

Moderator
Around 80-90% of schools use Logicator and flowcharts.
The majority of 'hobbyists' on this forum use BASIC, so forum relies here will probably not reflect what most schools use!
Further to the advise given by Technical, I believe (from observation) that the majority of frequent participants in this PICAXE forum use the Programming Editor (PE) and textual based BASIC programming.

Certainly there are far more and typically faster responses in general to a BASIC program question that to a flow charting related question.

Within the PE, the flow charting capabilities are limited and not all PE commands are available. I presume that with Logicator this is not the case.
Most other programming languages in the real world are text based as opposed to flow chart based.

Thus while getting started and using flow charts may make it easier for students in the class room environment so exposure to textual based programming together with inclusion of comments and good formatting/indenting of structures and loops, etc will IMHO give those students a better footing for bigger and better things in a programming environment beyond school should they desire to proceed into such a career.
 

aduy

Senior Member
dbarry722 are you using the PICs in a school, or college?

Because if you are, I'm only 17 and ive been writing in basic since i was about 12, so as far as students being able to use basic I dont think that will be an issue. I bet even some of the students that you are teaching know some basic already. The Texas Instruments Ti-83/84 graphing calculator runs on basic, and anyone can make programs for it in basic. if you want to get an idea of how many of them are familiar with basic, just ask your students if they have made any programs for their calculators.
 

John O

Senior Member
What are peoples opinions? Should I stick with learning basic or should I go the flowcharting route or a mixture of both.
If it's your own free choice not dependent on the 'dictates' of a majority, I'd stick with learning BASIC rather than flowcharting. Moving on to other languages will be much more intuitive of you haven't tied yourself into flowcharting.

Flowcharting always has its place -

1. It's useful to teach the concepts of programming.

2. A pencil-and-paper flowchart still sometimes helps to visualize a complicated branching loop; but I'd never use it as the final stage of a program.

John.
 

dbarry722

Member
dbarry722 are you using the PICs in a school, or college?

Because if you are, I'm only 17 and ive been writing in basic since i was about 12, so as far as students being able to use basic I dont think that will be an issue. I bet even some of the students that you are teaching know some basic already. The Texas Instruments Ti-83/84 graphing calculator runs on basic, and anyone can make programs for it in basic. if you want to get an idea of how many of them are familiar with basic, just ask your students if they have made any programs for their calculators.
Hi Aduy..

I'm actually the ICT technician in the school and this is my first dip in working with PIC's. I had asked the Technology teachers what direction I should go in terms of learning Basic or flowcharting. They both seemed to favour flowcharting. I can see the benefits and pitfalls of both but just wanted to get the views of experienced hands :)

Declan
 

MartinM57

Moderator
Remember it's PICAXEs, not PICs here ;) - are you clear on the difference?

Is this for you to learn with or for the pupils to learn? If the former, I would favour programming, but if the end game is for you to be able to support the pupils with their flowcharts, then you will need that.

The (slightly) bigger picture would help us to help you....
 

pete20r2

Senior Member
If I was teaching, at a high school level, I would teach BASIC, as others have said, writing the code is closer to what you have to do in the real world. In a learning environment, most tasks set are not incredibly difficult to overcome, making an efficient and elegant solution is the hard part. Again, there are some functions not directly accessible by flowcharting. BASIC may be more difficult to teach but I think it would be more beneficial to the students.
 

dbarry722

Member
Remember it's PICAXEs, not PICs here ;) - are you clear on the difference?

Is this for you to learn with or for the pupils to learn? If the former, I would favour programming, but if the end game is for you to be able to support the pupils with their flowcharts, then you will need that.

The (slightly) bigger picture would help us to help you....
Hi MartinM57..

Sorry, slip of finger and tumbs :p

Actually I've got myself in a bit of a tissy. I tried building on breadboard a basic circuit just to turn on an led using one of the picaxe chips from the technology department and for the life of me, I can't get COM1 to connect to it using programming editor. I've tested the serial lead on one of the Tech Depts GENIE 08 boards using circuit wizard and it works fine.

Is there a difference in programming Picaxe chips using Circuit Wizard and/or Programming Editor?

Declan
 

MartinM57

Moderator
What serial lead?

What connection to the PC - genuine serial port or USB?

Have you tried the serial port test - View|Options|Test Port button (may have to check the Show Port Help Tools box)?
 

dbarry722

Member
What serial lead?

What connection to the PC - genuine serial port or USB?

Have you tried the serial port test - View|Options|Test Port button (may have to check the Show Port Help Tools box)?
Its the standard AXE026 serial port cable.

I've tried the serial test port which does give me the relevant voltage at pin 2. As I say the cable works fine on the GENIE 08 Jukebox board (played with National anthems last night - alternated between God save the Queen and Irish Anthem :p)

Just a thought though. What speed does the COM1 port need to be at when using Picaxe programming editor. Is it 9600 or 2400?

Declan
 

dbarry722

Member
Doh!!:rolleyes:

Bit of a numpty. Just discovered from Technical that the Genie Picaxe and the Picaxe are different chips. Having spoken to our Technology Department they also confirmed that the Genie Picaxe chips have some coding added to work with Circuit Wizard.

Just bought an 08M and a 14M starter pack to bring everything back into line.

Many thanks

Declan
 

hippy

Ex-Staff (retired)
Just to clarify, there are no "Genie Picaxe" chips, only "Genie" and "PICAXE" chips which are two completely different things. Only Revolution Education Ltd manufacture PICAXE chips.
 

dbarry722

Member
Sorry. should have said that better. From what I gather (stand to be corrected) the picaxe chips that work with Circuit Wizard appear to have additional coding in them to work with their software.

I actually find it a bit strange that genie hasn't marked them in such a way that they can be diffrentiated form normal picaxe chips.

Declan
 

pete20r2

Senior Member
From what I understand, GENIE is a software made by an educational subdivision of Microchip International, the same company behind Revolution education, or is that a different entity?
 

hippy

Ex-Staff (retired)
Sorry. should have said that better. From what I gather (stand to be corrected) the picaxe chips that work with Circuit Wizard appear to have additional coding in them to work with their software.
There are no PICAXE chips which work with CW; I think you mean PIC / PICmicro chips from Microchip.

They are (usually) provided as blanks, unprogrammed, and Revolution Education puts their PICAXE firmware into them and creates a PICAXE. Other manufacturers take their blanks and put their own firmware in them to creates something else.
 

hippy

Ex-Staff (retired)
From what I understand, GENIE is a software made by an educational subdivision of Microchip International, the same company behind Revolution education, or is that a different entity?
You have to be careful with terminology there.

Revolution Education Ltd is an entirely independent privately owned company, not a subdivision nor a subsidiary of Microchip. The business relationship is no different in character to those of the many other companies which Rev-Ed deals with.

I believe the same is true of the other company.
 
Top