im new to gcb but not microcontrollers,i have been playing with picaxe for the last 2 or 3 years and also recently mplabx and C to use the raw pics without the picaxe bootloader.
now although the language is familiar to me in most ways and i feel comfortable to attempt to work with it i just for the life of me cannot find any proper/decent tutorials to help get me on my way.
its all well and fine with people posting youtube videos of how to get a glcd working and what not but that doesnt help the newbie.
i cannot find any real information about putting a project together and any specifics to layout of the workspace ect and as a newbie already i feel that i should just walk away, im also intending to use my pickit3 but again find so many different posts/threads which just end up adding to the confusion of how to get started.
when i look at the workspace for gcb i have no idea how i can compile and check for errors prior to even attempting to put any code on a chip (never mind getting the pickit working) all of these little things that seem hard to find good info for just add to the push away effect to the newcomer.
i know this is open source and built on contributions of time/knowledge of others but at least can someone point me to some real and useful tutorials that can at least get me off in the direction of progress.
thank you,
tony
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Welcome to GCB. Your request is valid, and, there will be many different views on the answer.
I migrated from Picaxe to GCB a few years ago, so this is my experience. I will create a document this week and post a Youtube video also. I will improve as we get more input.
For the rational for using GCB@SYN I will create an additional posting.
Unzip GCB@SYN into a folder. I would recommend c:\dev
By unzipping GCB@SYN you will have a complete install of Great Cow Basic (GCB) and Great Cow Graphical Basic (GCGB).
If you prefer an IDE approach with the most flexibility - use GCB
If you prefer an ICON based approach with the most flexibility - use GCGB
GCB. This is an IDE. You can edit, revise, compile and upload firmware with ease.
GCGB. This is ICON based editor where you can also edit, revise, compile and upload firmware with ease.
Why the difference? GCB permits full flexibility. GCGB is an interface that enables the user to create solutions with minimal knowledge of the underlying complexity.
So, how do you start GCB?
Always start a GCB@SYN from the IDE icon. This icon will be your installation folder in the folder \GCB@Syn\IDE.EXE
So, how do you start GCGB?
Start the 'Great Cow Graphical BASIC' from the icon. This icon will be your installation folder in the folder \GCB@Syn\GreatCoWBasic. The application is called 'Great Cow Graphical BASIC.exe'
Depending on your choice of GCB or GCGB you should create a link on your start menu.
So, you now want to create a solution. See next posting.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You will need to choose a chip architecture, use the GCB examples to understand the syntax of GCB, use the HELP, compiling and test.
Choosing the chip architecture - have a look at this article It reviews some of the criteria - choose based on design needs (then select the power supply.. :-) ).
Use the 2015 demonstration code to understand the GCB syntax and the HELP file. The demonstration code is intended to show how to flash an LED to some complex operations.
Compiling within GCB@SYN is a simple operation. The process will generate the ASM, HEX, LST and an HTML. The ASM is the source assembler file, the HEX is the firmware and the other two files information on memory and code usage. Errors may occur when compiling - they will. Firstly, try to locate the error line using the output from GCB@SYN - then using the HELP resolve the root cause. There are a few common errors and when I get some time I will document.
Test. I typically test in an emulator first. You may have to test on the target chip.
Last edit: Anobium 2015-02-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When using GCGB the syntax is driven my the user interface. The UI provides help and guidance. The GCB code is generated from the GCGB software - you can see this code by selecting 'View as Text'. This can be useful when trying to understand the correct syntax in the GCB@SYN IDE.
Compiling within GCGB is a simple operation, select TOOLS and the appropriate programming method. The process will generate the ASM, HEX, LST and an HTML. The ASM is the source assembler file, the HEX is the firmware and the other two files information on memory and code usage. Errors may occur when compiling - they will. You will receive an error dialog to HELP you resolve the root cause.
Test. I typically test in an emulator first. You may have to test on the target chip.
Last edit: Anobium 2015-02-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Loading firmware from either GCB or GCGB to the selected chip architecture.
Microchip
- Pickit2 - More than one method to use this programmer....
Method 1. Using the Pickit 2 v2.60 software.
This method will uses the Pickit2 to automatically load the GCB hex file when you compile. It will load the hex file after every successful compilation. To use this method. Simply select 'Auto Import Hex + Write Hex' then select your hex file - and, it will autoload. To find your hex file? Select the filename tab in the IDE, right hand mouse and select the directory.
Ups - Autoloads hex when compiled.
Down - Does not support every chip. So, you need ensure your chip is supported. If not, use, one of the other methods. I do not think your specific device is supported by this method.
- Pickit3 - More than one method to use this programmer....
Method 1. Using the Pickit 3 v3.01 software.
This method will uses the Pickit3 to automatically load the GCG hex file when you compile. It will load the hex file after every successful compilation. To use this method. Start the Pickit3 software. Select Tools/Download Pickit Operating System then select the operating sysem PK3OSV020005.hex' normally in the folder 'C:\Program Files\Microchip\PICkit 3 v3'. This will change the operating mode of the Pickit. When this is complete select 'Auto Import Hex + Write Hex' then select your hex file - and, it will autoload. To find your hex file? Select the filename tab in the IDE, right hand mouse and select the directory.
Ups - Autoloads hex when compiled.
Down - Does not support every chip. So, you need ensure your chip is supported. If not, use, one of the other methods. Your chip 10F322 is supported by this method.
-IPE-Pusher-Bootloaders-Others
AVR
- AVRDude
- AVRDudess
- Others
Last edit: Anobium 2015-02-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Testing using Emulators. Again a short list. I am sure others will add more information. This of emulators does not include the IDEs from ATMEL and Microchip.
- AVR
The AVR Simulator IDE is good simulator for AVR. It has some good feature, a good list of supported hardware. The simulator is rather slow to operate (this may be my setup).
- Microchip
The PIC Simulator IDE is good simulator for Microchip. It has some good feature, a good list of supported hardware. The simulator is rather slow to operate (this may be my setup). You must get the correct simulator for your chip type.
- Real Pic Simulator
The Real Pic Simulator is circa 2009 simulator. The chip type supported are therefore limited but it very good. A few issues with the GLCD emulator but a very good tool.
Last edit: Anobium 2015-02-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
any usefull info for a newcomer you can throw my way ill gladly take, coming from the picaxe also im sure youll understand its not as straightforward in regards to getting started but i have made some progress so far.
i modified some parts of one of the demo programs for pwm and have that running on a 10F322 on the breadboard.
for the time being to get the generated hex file onto the chip i just direct used the microchip IPE, although i can see manually having to select the file each time for the ipe to load getting tedious, isnt there a more straightforward way to do that direct from the IDE?
for now im using the GCB@syn to try and progress, but its very late now and some progress has been made, i would like to port over alot of my picaxe codes eventually but for now the hurdle seems to be getting enough of an understanding of the language differences compared to picaxe and methods used when coding for that.
tony
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The differences are many but they are in these main functional areas.
Supported chips in Picaxe is subset of the Microchip devices. GCB has a large number of chips. See here of a list of supported chips
The HELP in Picaxe is excellent. Rule #1 for GCB. Only use the online Help or the help file supplied with GCB@SYN. THe Chipino help file is very good as this is now sourced from the GCB team but it will not contain the latest information. Always go to the online Help. Then, I would recommend ignoring all other older GCB documentation - it is either wrong or out of date. It will only confuse you
Programming. Picaxe uses as TTL/serial connection, it is very simple use, the IDE supports loading the code to the chip. GCB has a host of options - see here for a summary.
The dialects of Basic. Picaxe and GCB are both based on Basic. The HELP file and the demonstration code will help but the differences are too numerous for me to list here.
Constraints with the Dialect of Basic. Both languages have constraints but the big difference (from my pov) are variables and variable management, arrays, tables. I am sure there are more.
Emulators. Picaxe has a great code emulator in IDE. For GCB you will have to use an alternative emulator - there are a few. However, the two I use do not support the 10F322 :-)
Speed of operation. Picaxe is slower in operation then GCB generated code.
Porting. Start with a clean sheet every time. I struggled to port Picaxe basic to GCB but I gave up after Hugh told me to start with a clean approach - it was good advice.
Chip architectures - Picaxe is Microchip. GCB is Microchip and AVR.
Last edit: Anobium 2015-02-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I too am pretty new to GCB coming from another pic based platform. Just a word of encouragement, keep plugging away. Getting started is a bit tricky, but once you get the basics (npi) down, this is a great program to make your pic do great things. I came upon this by stumbling upon this website with lots of good info and a great starter product if you are so inclined...
This forum has been invaluable to me. Keep looking through here to get some ideas and help. Can you tell us more of your current set up or are you starting completely from scratch?
Welcome!!!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
GreatCowBasic.com is my website. I set it up to help others get started and I use the open source CHIPINO module with PIC16F886 but everything should apply to any GCB project. I like to use the 16F886 because it has many of the core features and lots of I/O.
The free download manual I put together tries to summarize the same information in the GCB help file with additional tips and tricks to help you get started.
The Sample code section offers simple code examples to help you get started. I hope to expand that further.
I also modified the GCB@SYN look a little with Arduino style buttons and also included all the setup for the PICkit 2 programmer. I then made it into a self install application so you can just run the installation file and GCB is setup ready to run so you can write your first application and program your device with a PICkit 2 or PICkit 2 clone.
When the next GCB@SYN is released I'll be using that unmodified (no Arduino icons) instead but with the PICkit 2 setup included again and an installation version.
My intent is not to compete with the main sourceforge GCB site but back when I built my site, the GCB site seemed confusing to me and to a lot of beginners. I tried to simplify that and offer more detail. I also need to improve my site further.
With the updates and sample files that Anobium, Hugh and others have been working on and the improvements to the sourceforge site, my site becomes less relevant but I will continue it and try to keep it up to date. I work with the guys at Howtronics.com for the development and sale of the hardware but like I said, the goal is to help anybody get started. You don't have to use the CHIPINO its just my choice of hardware as it makes it easy to plug in Arduino style shields.
I plan to add more Breadboard style images and projects using 16F886 using Fritzing.org images so it will be more useful to anybody rather than just CHIPINO users.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i will end up using a pic 12f1840 for most of my projects as this is what i currently use as its feature packed, getting away from an interpreter/bootloader is my main goal as it will allow me to use the tiny 10fxxx range for smaller projects and not have to loose speed due to command overheads, dont get me wrong i love the picaxe and it was my first dive into microcontrollers but i need chips in smaller packages and to save some darn money after the exchange rate turns that little picaxe 08m2 into an almost $5 CAD chip that would otherwise cost me $1.80 for the raw pic lol, i have an unhealthy smd circuit addiction, the smaller the better.
its good to see a few users here where picaxe users so my many future questions when i get stuck should hopefully be met with some guidance from others who where at one point trying to get to grips with the transition between the language.
chuck i did also come across your site and had a look over during my quest for info lol, you do have some valuable info their that was pieced together with other bits and pieces late last night when i decided to chuck a crude working program together, so i at least have accomplished a starting point to move forward from.
tony
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
yes that is where i initially got some of the pwm examples amongst other things.
the main issue for me is more about structure and layout and the things i have done automatically through using picaxe basic, such as declaring/naming variables at the top of the program before even getting into the main code itself and all the other things that you would set prior to getting the chip to do anything.
the use of variable does seem a bit more strange to me as well as only naming or inserting them when they are used not at the start like im used to doing, its probably not that much different im guessing but trying to not do it the way i have been doing and at the same time trying to get used to how the manuals state does sometimes get confusing for some reason.
tony
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Tony, just a thought... Why don't you post a sample of the code that you might want to port from picaxe to GCB that may include some of your concerns. That will allow an opportunity to see what the differences actually are that you are concerned about and what it may take to make thing work for you. This could be an all around interesting way to see how to skin the same cat with a bit of change in "dialect"
I do agree that sometimes it might be better to start with a clean slate, defining what you are trying to accomplish and attacking it with this new (to you and me) platform. As a noob to GCB, I have found that just simply experimenting first and then posting valid questions on this forum when "it doen't work", has been a great source of information. Anobium in particular has been very helpful, and without his input, I probably would have given up on my first "overzealous" project using GCB.
BTW, I started with the pic12f1840 also to shrink some of my projects from an overkill 28 pin pic32 to a very capable 8 bit pic and losing 20 pins to boot. I am super happy that I accidentally came across this great resource. My wife can attest to how much time I am spending on this new affair. At least I can say that I am spending my time with a cow, so she doesn't consider it competition...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
im not too worried about getting my code ported over right now as i just need to change how my mind tries to go at this (still picaxe thinking lol) i would still like to get my pickit3 working directly with the gcb ide, anobium posted above some info about using the pickit3:
"Method 1. Using the Pickit 3 v3.01 software.
This method will uses the Pickit3 to automatically load the GCG hex file when you compile. It will load the hex file after every successful compilation. To use this method. Start the Pickit3 software. Select Tools/Download Pickit Operating System then select the operating sysem PK3OSV020005.hex' normally in the folder 'C:\Program Files\Microchip\PICkit 3 v3'. This will change the operating mode of the Pickit. When this is complete select 'Auto Import Hex + Write Hex' then select your hex file - and, it will autoload. To find your hex file? Select the filename tab in the IDE, right hand mouse and select the directory.
Ups - Autoloads hex when compiled.
Down - Does not support every chip. So, you need ensure your chip is supported. If not, use, one of the other methods. Your chip 10F322 is supported by this method."
now i cant find any pickit3 software, i only ever used it with mplabx and more recently with the mplab ipe, even if i google it anything that comes back even from microchip only mentions using mplabx with it.
now after messing around with a couple of different 10f chips to try things the amount of time i had to constantly direct the mplabx ipe to my file to flash quickly builds up, if i can just compile/flash straight from the gcb ide then that would be an accomplished goal, but for now i cannot find any pickit3 software that i need to use/change settings so the gcb ide can take control of that and at least save some time their.
your last few lines did make me chuckle,lol thankfully my wife is patient and understanding with my hobbies/interests too
tony
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I understand you wanting to use your PICkit 3 and I recommend it for use with MPLAB and MPLAB X but for GCB, I cannot recommend enough that you should buy a PICkit 2 or PICkit 2 clone (piccircuit.com or howtronics.com).
It is so much more stable for use with GCB and it's already proven to work great.
Trying to get PICkit 3 to work just adds more frustration to learning GCB.
And some will tell you that PICkit 2 doesn't support the newer devices.
Not true. The source was open sourced and people have created update facilities to allow you to add new devices to the device file.
I've already done it and post all the info at my website:
So continue if you must but I will continue to recommend PICkit 2 for GCB to everyone that will listen. Open source programmer for an open source compiler.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
well as i seem to be on such a tight budget these days for any of my hobbies ill have to stick with the pickit3, i was just curious about setting it up as i had been under the impression from the vast info scoured the last few days that it would work, but for now if i have to load via the mplabx ipe that will suffice.
tony
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I started with GCGB and have stayed with it.
It is very easy to get started with and you have the choice of programming using the graphical interface or in text mode. You can swap back an forth between the two, which is often helpful to visualise what you have coded.
I have used the following PIC micros successfully with GCGB: 12F1840, 12F617, 16F88, 16F1847, 18F26k20, 18F26K80, 12C508.
I have both PicKit 2 & 3. Both work fine from GCGB. I prefer PicKit 2 as it is faster and simpler in operation with GCGB.
I have also recently started using Arduino devices. It has been a little fiddly to get GCGB to program the Arduino board using the installed bootloader but it all seems to work.
The big advantage of GCB/GCGB is that it is a fully compiled solution with no need to have any boot loader or interpreter code running. This yields fast, efficient and reliable solutions.
I have deployed commercial solutions using GCGB into totally unattended, solar powered emergency management environments without an issue. My main systems have over 32kbytes of binary code now running on the 18F26K22 chip.
I would encourage you to look at GCGB for your requirements.
Cheers
Peter.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thanks peter, i am having a play around to try and get used to it, its just the relearning a language i know but in different ways, still easier than mplabx and C lol.
its something i would like to get more comfortable with as its very usefull to me too, i use the various chips with the picaxe basic but the cost for one 08m2 1.60 GBP has jumped in price recently here in canada to $4.74 each.
as much as i love the quick ease of use and prototype to finished code its just costing me more in the long run, even if i buy direct from rev ed themselves.
i have been wanting to jump over to the raw pic for a while as a 12F1840 (which is the chip i use most with picaxe) is so much cheaper, it would stretch my budget so much more and opens up smaller package sizes too, i have some sot 23-6 10F200/322 chips to put to use, tiny lol
i shall continue to try and move forward and have fun, it just gets frustrating either trying to find an exact piece of info or when the grey matter stubbornly refuses to conform to the changes of something new lol
tony
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have built a number of projects using GCGB of recent years.
Here is a list of a few:
- remote, solar power flash flood monitoring and alarm system (sends alarms over mobile/cell phone network)
- mppt solar charging system and battery health monitoring system
- compact low cost SD card data logging system (4 AD channels + digital channels)
- race car flat shift controller and down shift blip controller
- race car shift lights indicator
- race car DRS control system
- CAN bus isolated repeater
- simple CAN bus data monitor and test message host (to stimulate slave modules in control system)
- non contact liquid flow meter prototype with SDI-12 data interface
- GPS based position aware switch device (switches on and off as it crosses a programmable geo-fence boundary)
There have been a few teething problems as GCGB evolves, but on the whole it is a good system to use.
Cheers
Peter.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi all,
im new to gcb but not microcontrollers,i have been playing with picaxe for the last 2 or 3 years and also recently mplabx and C to use the raw pics without the picaxe bootloader.
now although the language is familiar to me in most ways and i feel comfortable to attempt to work with it i just for the life of me cannot find any proper/decent tutorials to help get me on my way.
its all well and fine with people posting youtube videos of how to get a glcd working and what not but that doesnt help the newbie.
i cannot find any real information about putting a project together and any specifics to layout of the workspace ect and as a newbie already i feel that i should just walk away, im also intending to use my pickit3 but again find so many different posts/threads which just end up adding to the confusion of how to get started.
when i look at the workspace for gcb i have no idea how i can compile and check for errors prior to even attempting to put any code on a chip (never mind getting the pickit working) all of these little things that seem hard to find good info for just add to the push away effect to the newcomer.
i know this is open source and built on contributions of time/knowledge of others but at least can someone point me to some real and useful tutorials that can at least get me off in the direction of progress.
thank you,
tony
Welcome to GCB. Your request is valid, and, there will be many different views on the answer.
I migrated from Picaxe to GCB a few years ago, so this is my experience. I will create a document this week and post a Youtube video also. I will improve as we get more input.
By unzipping GCB@SYN you will have a complete install of Great Cow Basic (GCB) and Great Cow Graphical Basic (GCGB).
GCB. This is an IDE. You can edit, revise, compile and upload firmware with ease.
So, how do you start GCB?
Always start a GCB@SYN from the IDE icon. This icon will be your installation folder in the folder \GCB@Syn\IDE.EXE
So, how do you start GCGB?
Start the 'Great Cow Graphical BASIC' from the icon. This icon will be your installation folder in the folder \GCB@Syn\GreatCoWBasic. The application is called 'Great Cow Graphical BASIC.exe'
Depending on your choice of GCB or GCGB you should create a link on your start menu.
So, you now want to create a solution. See next posting.
Creating a solution in GCB.
You will need to choose a chip architecture, use the GCB examples to understand the syntax of GCB, use the HELP, compiling and test.
Choosing the chip architecture - have a look at this article It reviews some of the criteria - choose based on design needs (then select the power supply.. :-) ).
Use the 2015 demonstration code to understand the GCB syntax and the HELP file. The demonstration code is intended to show how to flash an LED to some complex operations.
Compiling within GCB@SYN is a simple operation. The process will generate the ASM, HEX, LST and an HTML. The ASM is the source assembler file, the HEX is the firmware and the other two files information on memory and code usage. Errors may occur when compiling - they will. Firstly, try to locate the error line using the output from GCB@SYN - then using the HELP resolve the root cause. There are a few common errors and when I get some time I will document.
Test. I typically test in an emulator first. You may have to test on the target chip.
Last edit: Anobium 2015-02-09
Creating a solution in GCGB.
When using GCGB the syntax is driven my the user interface. The UI provides help and guidance. The GCB code is generated from the GCGB software - you can see this code by selecting 'View as Text'. This can be useful when trying to understand the correct syntax in the GCB@SYN IDE.
Compiling within GCGB is a simple operation, select TOOLS and the appropriate programming method. The process will generate the ASM, HEX, LST and an HTML. The ASM is the source assembler file, the HEX is the firmware and the other two files information on memory and code usage. Errors may occur when compiling - they will. You will receive an error dialog to HELP you resolve the root cause.
Test. I typically test in an emulator first. You may have to test on the target chip.
Last edit: Anobium 2015-02-09
Rational for using GCG@SYN.
Loading firmware from either GCB or GCGB to the selected chip architecture.
Microchip
Method 1. Using the Pickit 2 v2.60 software.
This method will uses the Pickit2 to automatically load the GCB hex file when you compile. It will load the hex file after every successful compilation. To use this method. Simply select 'Auto Import Hex + Write Hex' then select your hex file - and, it will autoload. To find your hex file? Select the filename tab in the IDE, right hand mouse and select the directory.
Ups - Autoloads hex when compiled.
Down - Does not support every chip. So, you need ensure your chip is supported. If not, use, one of the other methods. I do not think your specific device is supported by this method.
Method 1. Using the Pickit 3 v3.01 software.
This method will uses the Pickit3 to automatically load the GCG hex file when you compile. It will load the hex file after every successful compilation. To use this method. Start the Pickit3 software. Select Tools/Download Pickit Operating System then select the operating sysem PK3OSV020005.hex' normally in the folder 'C:\Program Files\Microchip\PICkit 3 v3'. This will change the operating mode of the Pickit. When this is complete select 'Auto Import Hex + Write Hex' then select your hex file - and, it will autoload. To find your hex file? Select the filename tab in the IDE, right hand mouse and select the directory.
Ups - Autoloads hex when compiled.
Down - Does not support every chip. So, you need ensure your chip is supported. If not, use, one of the other methods. Your chip 10F322 is supported by this method.
AVR
- AVRDude
- AVRDudess
- Others
Last edit: Anobium 2015-02-09
Testing using Emulators. Again a short list. I am sure others will add more information. This of emulators does not include the IDEs from ATMEL and Microchip.
The AVR Simulator IDE is good simulator for AVR. It has some good feature, a good list of supported hardware. The simulator is rather slow to operate (this may be my setup).
The PIC Simulator IDE is good simulator for Microchip. It has some good feature, a good list of supported hardware. The simulator is rather slow to operate (this may be my setup). You must get the correct simulator for your chip type.
- Real Pic Simulator
The Real Pic Simulator is circa 2009 simulator. The chip type supported are therefore limited but it very good. A few issues with the GLCD emulator but a very good tool.
Last edit: Anobium 2015-02-09
hi anobium,
any usefull info for a newcomer you can throw my way ill gladly take, coming from the picaxe also im sure youll understand its not as straightforward in regards to getting started but i have made some progress so far.
i modified some parts of one of the demo programs for pwm and have that running on a 10F322 on the breadboard.
for the time being to get the generated hex file onto the chip i just direct used the microchip IPE, although i can see manually having to select the file each time for the ipe to load getting tedious, isnt there a more straightforward way to do that direct from the IDE?
for now im using the GCB@syn to try and progress, but its very late now and some progress has been made, i would like to port over alot of my picaxe codes eventually but for now the hurdle seems to be getting enough of an understanding of the language differences compared to picaxe and methods used when coding for that.
tony
I will cover moving from Picaxe to GCB here:
The differences are many but they are in these main functional areas.
Last edit: Anobium 2015-02-09
Hello Tony,
I too am pretty new to GCB coming from another pic based platform. Just a word of encouragement, keep plugging away. Getting started is a bit tricky, but once you get the basics (npi) down, this is a great program to make your pic do great things. I came upon this by stumbling upon this website with lots of good info and a great starter product if you are so inclined...
http://www.greatcowbasic.com
This forum has been invaluable to me. Keep looking through here to get some ideas and help. Can you tell us more of your current set up or are you starting completely from scratch?
Welcome!!!!
GreatCowBasic.com is my website. I set it up to help others get started and I use the open source CHIPINO module with PIC16F886 but everything should apply to any GCB project. I like to use the 16F886 because it has many of the core features and lots of I/O.
The free download manual I put together tries to summarize the same information in the GCB help file with additional tips and tricks to help you get started.
The Sample code section offers simple code examples to help you get started. I hope to expand that further.
I also modified the GCB@SYN look a little with Arduino style buttons and also included all the setup for the PICkit 2 programmer. I then made it into a self install application so you can just run the installation file and GCB is setup ready to run so you can write your first application and program your device with a PICkit 2 or PICkit 2 clone.
When the next GCB@SYN is released I'll be using that unmodified (no Arduino icons) instead but with the PICkit 2 setup included again and an installation version.
My intent is not to compete with the main sourceforge GCB site but back when I built my site, the GCB site seemed confusing to me and to a lot of beginners. I tried to simplify that and offer more detail. I also need to improve my site further.
With the updates and sample files that Anobium, Hugh and others have been working on and the improvements to the sourceforge site, my site becomes less relevant but I will continue it and try to keep it up to date. I work with the guys at Howtronics.com for the development and sale of the hardware but like I said, the goal is to help anybody get started. You don't have to use the CHIPINO its just my choice of hardware as it makes it easy to plug in Arduino style shields.
I plan to add more Breadboard style images and projects using 16F886 using Fritzing.org images so it will be more useful to anybody rather than just CHIPINO users.
thanks for all the advice/pointers.
i will end up using a pic 12f1840 for most of my projects as this is what i currently use as its feature packed, getting away from an interpreter/bootloader is my main goal as it will allow me to use the tiny 10fxxx range for smaller projects and not have to loose speed due to command overheads, dont get me wrong i love the picaxe and it was my first dive into microcontrollers but i need chips in smaller packages and to save some darn money after the exchange rate turns that little picaxe 08m2 into an almost $5 CAD chip that would otherwise cost me $1.80 for the raw pic lol, i have an unhealthy smd circuit addiction, the smaller the better.
its good to see a few users here where picaxe users so my many future questions when i get stuck should hopefully be met with some guidance from others who where at one point trying to get to grips with the transition between the language.
chuck i did also come across your site and had a look over during my quest for info lol, you do have some valuable info their that was pieced together with other bits and pieces late last night when i decided to chuck a crude working program together, so i at least have accomplished a starting point to move forward from.
tony
Tony, have a look at here this may help our new users.
Is this a good place to point the new users in terms of example code that is relatively simple?
yes that is where i initially got some of the pwm examples amongst other things.
the main issue for me is more about structure and layout and the things i have done automatically through using picaxe basic, such as declaring/naming variables at the top of the program before even getting into the main code itself and all the other things that you would set prior to getting the chip to do anything.
the use of variable does seem a bit more strange to me as well as only naming or inserting them when they are used not at the start like im used to doing, its probably not that much different im guessing but trying to not do it the way i have been doing and at the same time trying to get used to how the manuals state does sometimes get confusing for some reason.
tony
Hi Tony, just a thought... Why don't you post a sample of the code that you might want to port from picaxe to GCB that may include some of your concerns. That will allow an opportunity to see what the differences actually are that you are concerned about and what it may take to make thing work for you. This could be an all around interesting way to see how to skin the same cat with a bit of change in "dialect"
I do agree that sometimes it might be better to start with a clean slate, defining what you are trying to accomplish and attacking it with this new (to you and me) platform. As a noob to GCB, I have found that just simply experimenting first and then posting valid questions on this forum when "it doen't work", has been a great source of information. Anobium in particular has been very helpful, and without his input, I probably would have given up on my first "overzealous" project using GCB.
BTW, I started with the pic12f1840 also to shrink some of my projects from an overkill 28 pin pic32 to a very capable 8 bit pic and losing 20 pins to boot. I am super happy that I accidentally came across this great resource. My wife can attest to how much time I am spending on this new affair. At least I can say that I am spending my time with a cow, so she doesn't consider it competition...
hi viscomjim,
im not too worried about getting my code ported over right now as i just need to change how my mind tries to go at this (still picaxe thinking lol) i would still like to get my pickit3 working directly with the gcb ide, anobium posted above some info about using the pickit3:
"Method 1. Using the Pickit 3 v3.01 software.
This method will uses the Pickit3 to automatically load the GCG hex file when you compile. It will load the hex file after every successful compilation. To use this method. Start the Pickit3 software. Select Tools/Download Pickit Operating System then select the operating sysem PK3OSV020005.hex' normally in the folder 'C:\Program Files\Microchip\PICkit 3 v3'. This will change the operating mode of the Pickit. When this is complete select 'Auto Import Hex + Write Hex' then select your hex file - and, it will autoload. To find your hex file? Select the filename tab in the IDE, right hand mouse and select the directory.
Ups - Autoloads hex when compiled.
Down - Does not support every chip. So, you need ensure your chip is supported. If not, use, one of the other methods. Your chip 10F322 is supported by this method."
now i cant find any pickit3 software, i only ever used it with mplabx and more recently with the mplab ipe, even if i google it anything that comes back even from microchip only mentions using mplabx with it.
now after messing around with a couple of different 10f chips to try things the amount of time i had to constantly direct the mplabx ipe to my file to flash quickly builds up, if i can just compile/flash straight from the gcb ide then that would be an accomplished goal, but for now i cannot find any pickit3 software that i need to use/change settings so the gcb ide can take control of that and at least save some time their.
your last few lines did make me chuckle,lol thankfully my wife is patient and understanding with my hobbies/interests too
tony
I understand you wanting to use your PICkit 3 and I recommend it for use with MPLAB and MPLAB X but for GCB, I cannot recommend enough that you should buy a PICkit 2 or PICkit 2 clone (piccircuit.com or howtronics.com).
It is so much more stable for use with GCB and it's already proven to work great.
Trying to get PICkit 3 to work just adds more frustration to learning GCB.
And some will tell you that PICkit 2 doesn't support the newer devices.
Not true. The source was open sourced and people have created update facilities to allow you to add new devices to the device file.
I've already done it and post all the info at my website:
http://www.elproducts.com/build-your-own-pickit-2.html
So continue if you must but I will continue to recommend PICkit 2 for GCB to everyone that will listen. Open source programmer for an open source compiler.
well as i seem to be on such a tight budget these days for any of my hobbies ill have to stick with the pickit3, i was just curious about setting it up as i had been under the impression from the vast info scoured the last few days that it would work, but for now if i have to load via the mplabx ipe that will suffice.
tony
Hi Tony,
I started with GCGB and have stayed with it.
It is very easy to get started with and you have the choice of programming using the graphical interface or in text mode. You can swap back an forth between the two, which is often helpful to visualise what you have coded.
I have used the following PIC micros successfully with GCGB: 12F1840, 12F617, 16F88, 16F1847, 18F26k20, 18F26K80, 12C508.
I have both PicKit 2 & 3. Both work fine from GCGB. I prefer PicKit 2 as it is faster and simpler in operation with GCGB.
I have also recently started using Arduino devices. It has been a little fiddly to get GCGB to program the Arduino board using the installed bootloader but it all seems to work.
The big advantage of GCB/GCGB is that it is a fully compiled solution with no need to have any boot loader or interpreter code running. This yields fast, efficient and reliable solutions.
I have deployed commercial solutions using GCGB into totally unattended, solar powered emergency management environments without an issue. My main systems have over 32kbytes of binary code now running on the 18F26K22 chip.
I would encourage you to look at GCGB for your requirements.
Cheers
Peter.
thanks peter, i am having a play around to try and get used to it, its just the relearning a language i know but in different ways, still easier than mplabx and C lol.
its something i would like to get more comfortable with as its very usefull to me too, i use the various chips with the picaxe basic but the cost for one 08m2 1.60 GBP has jumped in price recently here in canada to $4.74 each.
as much as i love the quick ease of use and prototype to finished code its just costing me more in the long run, even if i buy direct from rev ed themselves.
i have been wanting to jump over to the raw pic for a while as a 12F1840 (which is the chip i use most with picaxe) is so much cheaper, it would stretch my budget so much more and opens up smaller package sizes too, i have some sot 23-6 10F200/322 chips to put to use, tiny lol
i shall continue to try and move forward and have fun, it just gets frustrating either trying to find an exact piece of info or when the grey matter stubbornly refuses to conform to the changes of something new lol
tony
I have built a number of projects using GCGB of recent years.
Here is a list of a few:
- remote, solar power flash flood monitoring and alarm system (sends alarms over mobile/cell phone network)
- mppt solar charging system and battery health monitoring system
- compact low cost SD card data logging system (4 AD channels + digital channels)
- race car flat shift controller and down shift blip controller
- race car shift lights indicator
- race car DRS control system
- CAN bus isolated repeater
- simple CAN bus data monitor and test message host (to stimulate slave modules in control system)
- non contact liquid flow meter prototype with SDI-12 data interface
- GPS based position aware switch device (switches on and off as it crosses a programmable geo-fence boundary)
There have been a few teething problems as GCGB evolves, but on the whole it is a good system to use.
Cheers
Peter.