08m2 and AXE033b drifting off frequency with temperature change

jareid

New Member
Using the above units together, they work fine as long as the Calibfreq on the 08m2 is set to -15 and the RST pins are briefly reset on the AXE033b.
This will work ok for around 10 hours at room temperature and then spurious characters start appearing. If the temperature drops to around 12c then the problem seems to start sooner.

Simple circuit with 7805 supply and 1.2k to ground on Serin pin (pin2 on chip). Decoupled by 100uf and 0.1uf ceramic.
Direct connection to serin on AXE033b

The pair work faultlessly if connected by I2C method.

Any guidance
 

Attachments

nick12ab

Senior Member
As it works flawlessly on i2c, it is clearly a timing issue with the asynchronous serial since i2c, which has a clock signal too, is working. What happens if you don't use the RST pads and don't use RST?

Your code looks like it's being used in a car - "Skoda Octavia" - an electrically noisy environment. Is the decoupling at both sides of the regulator? As a car's interior will vary in temperature a lot, using i2c sounds like it'll be the better option anyway.
 

jareid

New Member
Thanks for quick response.
The display although intended "possibly" for in a car is presently in my workshop and on a bench power supply prior to the 7805.
When the problem is most severe after 10 hours or so, it is almost impossible to get any logical characters on the lcd unless the RST is shorted briefly.
Incidently the AXE033 has worked perfectly previously (and still does) with an 08M with no need for Calibfreq or RST.
I have tried two 08m2 same results for each - as described above.
 

nick12ab

Senior Member
Hippy has previously posted some serial testing code on the forum here from when I once had a related problem with a PICAXE-based Serial GLCD I(/the forum) was making.

You might want to try the code - if the sender code works when connected to the computer then it's some sort of electrical issue. Also, check that there isn't an opportunity for the oscillator to not be stable in your code that I may have missed such as setfreq just before/after comms use.
 

Technical

Technical Support
Staff member
Unless you updated your PE software on Friday to 5.5.0, then calibfreq -15 on the 08M2 would not have actually done anything at all to the 08M2's internal calibration due to a bug in the compiler, negative values were not working on M2 parts!

So that may be a bit of wild goose chase - try downloading the latest build and trying again
www.picaxe.com/PE
 

Goeytex

Senior Member
Hardware serial (hserout) is much more accurate than serout. Try using hserout instead of serout. If the symptom persists then that suggests that the problem is inaccuracy of serial comm on the 033 board. (The manual says that accuracy is sometimes an issue with the 033.)

In that case you can adjust the baud rate of hserout using the formula in the manual under hsersetup. What you want is to find the center baud rate. To do this adjust, hsersetup baud above 2400 until it fails and take note of the baud rate. Then adjust it below 2400 until it fails and take note again. Add the two rates together and divide by 2 to get the center baud rate. Then set hsersetup baud_rate to that center number. Being in the "center" of what the 033 is expecting to receive means that there is little chance that frequency drift will cause a problem.

For Example:

< hsersetup 434, %10 > equals a baud rate of 2300
< hsersetup 416, %10 > equals a baud rate of 2400
< hsersetup 399, %10 > equals a baud rate of 2500

So start at 416 and increase the value By 1 until it just fails. Note the number. Then start at 416 and decrease the number until it just fails and take note: Add the two numbers together and divide by 2 and you will have the optimal baud rate to send to the Axe033. AND by not using calibfreq the 08m2 timing accuracy will not be affected.

Using calibfreq to modify software serial baud rate is sometimes undesirable as it changes the clock speed and will cause inaccuracies with other commands, especially those that are timing sensitive.
 
Last edited:

jareid

New Member
Thanks for all your super responses, I will download the latest PE and then look at the serial out options you have advised.
Super forum, super software and unbelievable products. Thanks for all you do.
 
Top