Max SERIN and SEROUT Speeds for PIXACE

westaust55

Moderator
Attached is a table associated with the SERIN and SEROUT commands to which I have added indication for the maximum speed for the various current PICAXE chips.

Maybe Rev Ed can add some further information in the next revision of the manuals to better flag this for users.
 

Attachments

Last edited:

Dippy

Moderator
That's good Westy.

Can you add an example drop of code to show an example?

I still think the Manual needs expanding in places.
Fine for Old lags and semi-Newbies.
Some bits frightening to Newbies, including the setfreq command.

The Newbie reads "setfreq" command in Manual and sees:-
"....external em4, em8, em10, em16, em20...."

then a few lines later he reads:-
"On devices with fixed external resonators this command cannot be used - the
value of the external resonator must be changed to alter the clock frequency."


Newbie says "Eh? It says external but you mean i can't use it?".

It needs more explanation and examples.

Is "em8" a 'declaration' for an external resonator/xtal so the internal time constants can be corrected?
If so, say so. If not, then what does it do?
All this is missing.

PS. It would be so nice to have a speed declaration which automatically adjusts the internal time constants.
 

womai

Senior Member
From what I think I've gathered from previous replies by technical, the resonator settings (em16) will indeed change the timing constants of some commands (e.g. readtemp), but not affect others (e.g. pause). I.e. the former group will work unchanged no matter what the actual frequency is (provided you use the correct command, e.g. setfreq em16 if you use an external 16 MHz crystal), but the latter will change with clock speed (e.g. pause 1000 will only take 250 msec at 16 MHz).

Wolfgang
 

frank_p

Member
@westaust55
Serial communication is sometimes not clearly defined in the manuals. For example the MAX232 IC is it needed for serial communication between 2 picaxes? I don't think so, myself.

I also have the book "Programming and Customizing the PICAXE Microcontroller" but also in this book things are not explained very clear. The circuit diagrams for serial communication do not match the ones in the manual where it explains serial communication.

For example, correct me if i'm wrong here; when using Serial-To-USB communication the MAX232 is not needed according to what i've been experimenting. You have the conversion done inside the cable itself. It would be extremely useful to explain this anomaly.

Also it would be as much useful if all these tips and suggestions are adopted by the people maintaining the manuals themselves. It would save a lot of trouble especially to newbies who need to search a huge archive inside this forum.

In any case keep up the good work.
 

Dippy

Moderator
Yes, further explantion is needed in several areas.
AND I agree that the Forum is NOT the best place for much of this.
The Forum should surely be for queries etc. above-and-beyond the basics.

The basics and some more get-you-started examples should be in a SINGLE point-of-reference manual.
What we have already is good, but a weeks-worth of hippy-time could make them a lot better - particularly for Newbies. Writers should, in this market, assume near-zero experience.

(And whether or not a MAX is needed between 2 PICAXEs depends on the app. In 99% of typical cases I reckon not).

Thanks for info Wolfgang.
Why isn't all this sort of stuff in the Manual??
 

tarzan

Senior Member
B115200_x

Don’t forget that you can “roll your own” baud speed with HSERSETUP this is explained in the manual.
 

hippy

Ex-Staff (retired)
I agree there are places in the manual where clarification and expansion would help, there are some corrections needed and Rev-Ed does intend to improve things in that respect.

The high-level issue is what needs changing or adding, where and what its utility is in practice.

There is often the argument that things should change to help newbies but that is open to debate, though it does depend upon what anyone means by newbie and what level of experience such newbies are deemed to actually have.

Do we really mean newbies are those with near zero experience or something else ? And just how far should anyone go in providing a educational resource for people with no prior experience ? Don't forget that most who have never encountered the PICAXE before are discovering it as part of their educational experience in properly structured and tutored classes. When Ferrari et al produce new Formula 1 cars they undoubtedly come with loads of technical documentation but how reasonable or realistic is it to say they should provide manuals to allow anyone, even those who have never even been in a car, to use and maintain it ?

I'd personally argue that someone who understands MAX232's, is into using multiple PICAXE systems, I2C, has complicated interfacing or working with the more advanced PICAXE's and the like is well beyond newbie status. Such things are above the abilities of the true newbie where detailed discussion of those will likely simply confuse them or put them off. This brings us to, what exactly are "the basics" which do need to be covered ?

In reality then there are generally three categories of PICAXE users -

1) The newbies who are first encountering PICAXE's and often electronics as well, most likely as part of their education.

2) Those who are well versed in microcontrollers or electronics but have never used a PICAXE, capable and used to finding and determining information for themselves.

3) Those with some previous experience who fall between the other two groups, quite often venturing into areas where they have no prior experience.

It is probably (IMO) the third group which is having the most difficulty and asking for help with using the PICAXE.

How best to serve all those groups is something which Rev-Ed does consider and will continue to do so.
 
Last edited:

westaust55

Moderator
That's good Westy.

Can you add an example drop of code to show an example?

I still think the Manual needs expanding in places.
Fine for Old lags and semi-Newbies.
Some bits frightening to Newbies, including the setfreq command.
I will look at expanding on this topic . . . maybe tomorrow.
Off to watch a movie now . . . .
 

Dippy

Moderator
Look at that - it's only the 2nd of Jan ad we're at it already...:)

Woah there, me old hipster chum...

Whats the market for PICAXE?
Education and hobbyists for 90% of the time?

So, I agree with your main categories, but what's the rough split?

I always like your analogies but the Formula One comparison really doesn't get onto the back row of the grid. And it's certainly behind Jenson Button.

I'm sure Rev-Ed intend to update and modify.
I intend to do a lot of things.... the cheque's in the post.... the world's most popular intention eh?
Yes, I have seen updates and some additions, but NOTHING significant in the meat. Sorry.

For many, if not most, PICAXE will be the first step onto the micro ladder.
(So, at this stage you know nothing about MAX232s so let's not go off at a tangent here.)

You then (hopefully) start reading the Manual.
And, yes, for most people there is enough info on how to flash and many other things.
In most resepect its very good. In many cases, however, it's not so clear.
As we know, many people learn more quickly by looking at worked examples.
The Manual is a bit 'thin' in this respect.
It always gives me the impression of a good 'summary' rather than a learning aid - which is surely most of the raison d'etre?
Revolution EDUCATION.

Look at the setfreq example. The lack of explanations are fairly obvious.
Why should people have to post a question or spend an hour searching on the FORUM for the sake of 2 sentences which someone could have added to the Manual??

And surely Rev-Ed have had enough time to go through and check spelling and typoes? Surely...? They've been there for years.

"pulsin 3,1,w1 ‘ record the length of a pulse on pin 3 into b1"
- really? Whats a Newbie going to make of that?

PUT.
Function:
Write data into scratchpad location.


Example:
put 1,b1 ‘ save value of b1 in register 1
put 1, word w1


'Scratchpad locations' one minute then 'registers'.
A minor example of inconsistency but please consider the Newbie and people who are non-English speakers.

If you want to see a good example aimed at education (and Newbies) then check out the old fat Basic Stamp Manual.
And, if a large target is schools the SURELY the Manual should almost be a working 'exercise book' for reference in the classroom? (Even if it saves the red faced DNT teacher who doesn't know the subject}

Please note: I am trying to be diplomatic and constructive here.

So, write the manual with the main content as we have already and THEN supplement each section with further explanation, worked examples and even some basic circuits to see it in action.
Assume the knowledge is almost ZERO, then the PICAXE Manual will become THE reference.
The experienced user can read the main body and skim the examples. The Newbie can study the examples and see how the code is structured, and where necessary see how it relates to external circuitry.

A lot of work yes... but should have been started years ago.
Apologies if the above has sounded rude, it's not meant to be.
I'm telling you what I'd like to see if I was still wet behind the ears.
 

hippy

Ex-Staff (retired)
Feedback is appreciated and yes it is taken on board, yes there are errors, that is accepted.

As to the how and why etc, it's not my position to answer that, nor say what will be in the future. The best I can give is my perspective as an individual, and that's all it is, a perspective.

I do not know what the market split is or how most PICAXE users learn about it, I only have my own experience to go on. Again from a personal perspective - the few posts there are on specific issues with the manuals would suggest to me that most people do not have many problems, presumably not running into them or being able to work round them for themselves. Yes, everyone acknowledges documentation can always be better, there can always be more of it, and - personal opinion again - if Rev-Ed sold their product at a ten-fold price to what they do, maybe there would be more of it already.

I appreciate everyone has there own perspectives on what manuals should be, and that includes Rev-Ed, but I will not get into a debate on specifics, what is right or wrong, what is considered 'best'.
 

manuka

Senior Member
if Rev-Ed sold their product at a ten-fold price to what they do
Interesting that you mention this Hippy. Back in 2002,when I first ran across PICAXEs, the £1 price for a 08 seemed a misprint,as I'd considered £10 more in line with the market!

It's near impossible to get folks agreeing on style -apparently the iconic & now beloved Eiffel Tower was universally hated when first erected. Educationally, disputes on learning & delivery approaches can become comparable to Middle Eastern conflicts. My (now) preferred approach to electronics may cause mucho anguish to those expecting cut & dried parrot fashion delivery, & vice versa. I recall,as an army signaller in my youth, offering insights into VHF antenna (so as to effect a difficult field link), yet being roundly abused for my lateral thinking as "That's not in the instruction manual". Learning preferences & expectations further change with age, experience & culture as well. I personally find the Rev.Ed references first rate, but certainly have views on improvements!

The modern technique of providing extensive web links seems the best overall work around, especially since such linked material can be readily updated & tweaked as need be. Stan.
 

westaust55

Moderator
Application of SERIN and SEROUT commands

Attached is my "expanded tutorial" on the SERIN and SEROUT commands with particular reference to the PICAXE clock speed and baudrate setting keywords.

Any thoughts/comments? I can always expand further but the keep in in mind the aim is to expand on the SERIN and SEOUT functions without just a straight copy of the existing manuals.
 

Attachments

frank_p

Member
@ westaust55
thumbs up for your good work. A couple of weeks ago i had a long discussion about what you have written now and now comes this document explaining what i actually needed.

Your document is targeting the SERIN/SEROUT commands but my suggestion would be, given you have time to do it, to expand it to encapsulate serial communications using the picaxe. You don't need to put the commands syntax, because that is already there, (IMHO) what is needed is how to use them in relation to different hardware configurations.

In any case if you don't have the time, it's still a great job!!! Keep it up!!
 

westaust55

Moderator
Effect of changing the PICAXE clock Speed

As an adjunct to the words I have written on SERIN and SEROUT, attached is a table summarising the affect upon commands when the PICAXE clock speed is changed.


Possibly I can merge these together at a future time as a single reference.
 

Attachments

westaust55

Moderator
Look at that - it's only the 2nd of Jan ad we're at it already...:)

And surely Rev-Ed have had enough time to go through and check spelling and typoes? Surely...? They've been there for years.

"pulsin 3,1,w1 ‘ record the length of a pulse on pin 3 into b1"
- really? Whats a Newbie going to make of that?
Be careful which version of the manual is being used for reference.

In Manual 2 Rev 6.6 page 123 it now states:
pulsin 3,1,w1 ‘ record the length of a pulse on pin 3 into w1
 

ValueAdd

Senior Member
Westy,

those sheet make a useful addition. While some of the data is within the manuals, having it explained as you have and the summary for the effect of the Setfreq command on a whole range of other commands makes for a sheet worth printing and keeping at hand.
 

Dippy

Moderator
Good point Westy re: version.
That example was from the version obtained on the 'PICAXE Manual' / 'PICAXE Manual 2" dropdown as of 11:35 GMT. I've just checked.

Generally, they're fine. Generally, it's perfectly good.
Do you really have to charge 10x the price to pay for 30 minutes of 'proof reading' and running a Spell Checker?
Then export as PDF and save to Server.
One hour and a cup of coffee...?

Yes, its all personal opinion, but swayed by the evidence of some of the Forum questions e.g. the recent setfreq query.
I'm still not 100% in what all the parameters do, or what they change or what...
I thought the point of a manual was to describe what something does in varying degrees of detail...
I'm obviously mistaken. I was playing Devil's Advocate a bit, so there we are. Roger and out. Exit whinge procedure...Goto Kettle.
 

MFB

Senior Member
How it can be done

It should not really be necessary to re-invent an approach to documentation a microcomputer product that is aimed at the education market, as Parallax have been doing this successfully for over a decade.

Yes, they have a larger domestic market and now employ over forty people but from the very beginning Parallax have produced excellent tutorials. This is often in collaboration with staff working in the educational sector, probably on an informal basis.

For an example of how to support a product aimed at the educational market (and also sell significant quantities to hobby and professional users) take a look at the following downloadable material…

www.parallax.com/tabid/181/List/0/CategoryID/66/Level/a/Default.aspx?SortField=ProductName,ProductName
 

BeanieBots

Moderator
What's more worrying is that you have to go to a "known" typo to know which version you have. Where's the version control?

The irony is that it's version control which is used as an 'excuse' by documentation departments for not updating every typo as they're pointed out.

A product's "cover" is its documentation.
"Don't judge a book by it's cover", nice saying, but everyone does it.

Perception IS REALITY. Doesn't matter if everybody's perception is wrong. If it's perceived as 'naff', then it might as well be 'naff'.

No excuse at all for poor documentation.
It's the "window" to the product. Get it right and keep it right.
 

Dippy

Moderator
First impressions last, but never judge a sausage by it's skin.

And, yes, I've always been impressed by the writing (format and content) of the parallax stuff. I must check for typoes.. kidding.

Thought: maybe a spell and typo check will be done when the X2 comes out?
 
Top