Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Electronics : Windmill Charge Controller Chip & Code
Author | Message | ||||
noeln Newbie Joined: 09/10/2010 Location: New ZealandPosts: 2 |
As a newbie to Picaxe, I have built the windmill charge controller (Version 1)and copied the code supplied into the Picaxe Programming Editor. Gizmo states that it is written for a 28X chip. When I select 28X in the options, the syntax check states that there is only 16 Gosub commands allowed. If I change to a 28X1 chip, it is all good. So I bought a 28X1 chip However, my built up board displays gibberish. And I cant see anything wrong with my build, and dont want to spend on a 28X chip unless I cannot solve this question first. Any help would be appreciated |
||||
AMACK Senior Member Joined: 31/05/2009 Location: AustraliaPosts: 184 |
Noeln, There is one member on the forum that could answer your question. He is the PICAXE expert. If DOWNWIND (Pete) can not tell you, it can not be done. Give it time and he will give you all the answers you seak. There is also a new web site for PIC and PICAXE here in Australia. It is easy to find as pete has put up a post a few weeks back if you ask there it would be a better spot to ask questions on picaxe. AMACK *Note to self 1. Make it thick 2.Make it heavy. 3.Make it stronger than it should be. 4. Don't rush the first job as the second job will cost more and take mor |
||||
Downwind Guru Joined: 09/09/2009 Location: AustraliaPosts: 2333 |
Hi, In Programming Editor, go to the "options" and select 28X chip then you can select 16 gosubs (default setting) or 256 Gosubs. You will need to select 256 gosubs. The code is a little different between the 28X and the 28X1 and X2 chips and is most likely why you have giberish. Try going back to the 28X chip and selecting 256 gosubs and all should work. I have not built this project or even studied the code to work out what changes are needed to run it in a X1 or X2 chip. With X1 and X2 chips you need to set the pins as output in code first and address the pins slightly different than with the X chips, the base of the code should be the same. Pete. Sometimes it just works |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
Hi noeln Yeah Pete's right, you just need to select 256 gosubs in the Picaxe programmer for the software to work correctly with a 28X chip. I'm sure the windmill controller software could be changed to work with a 28X1 chip, but I dont have a 28X1 chip here to test with unfortunately, so you might be on your own. Is it sending serial data back to the PC? In the PicaxeProgramming Editor, click on PICAXE, Terminal, and you should see some serial data coming back from the controller if its working OK. Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
noeln Newbie Joined: 09/10/2010 Location: New ZealandPosts: 2 |
Brilliant, thanks Amack, Pete and Glenn For the Mk1 version, I set 256gosubs and programmed the 28X1 as a 28X. The display works perfectly. And yes, the serial data works is all good. The Mk2 version doesnt quite work as well but you have inspired me to look into the code and differences between the chips deeper and i will keep trying. (I plan to use your project as the basis for a slightly different system to the windmill. I have a Micro-hydro, solar and generator input system. So I hope to add 3 more inputs and show some more current readings on the display) cheers noeln |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
Good to hear its working with the Mk1 software. Mk2 is more complex, but if its working with Mk1 then its only a matter of making a few small changes to work with Mk2. Working out what the small changes are is the fun bit Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
Print this page |