Electronic Products
Find us here:
  • Books
    • Embedded C Books >
      • cbookfiles
      • cbook2files
      • cbook3files
    • BASIC Books >
      • Programming PICs in BASIC_vol1
      • PICBasic Book Support
      • Basic Atom Book Support
    • Other Books >
      • Arduino Book
      • chipkitbookfiles
  • Chuck's Blog
    • Blog Posts Archive
    • Disclaimer
  • YouTube Channel
  • About Chuck
    • About Chuck
    • Stock Car Racing
  • 3D Printing
    • Fabrikator Mini
  • Getting Started with PICs
    • BASIC Programming
    • C Programming >
      • C Compilers
  • Build Your Own PICKit 2
    • PICkit 2 Starter Kit
  • CHIPINO
    • Shields
  • CHIPAXE Breadboard Modules
  • Understanding Hex Files
  • chipKIT
  • Newsletter Archive
  • Contact
  • Retired Designs
    • BasicBoard
    • Ultimate OEM
    • Maximite BasicBox
    • Maximino
  • Downloads
  • Kickstarter Projects
    • Demo-Shield
  • Great Cow Basic Site
  • Buy Hardware
  • Links I Recommend

Great Cow Basic New Hot Release

4/13/2015

1 Comment

 
For anybody out there looking for a free open source BASIC compiler for PICs, then I highly recommend the Great Cow Basic Compiler. To make things even better, this compiler has been improved about 5000% in the last two years. A small group of individuals have contributed to making it better and I was one of the contributors to the team. There is now a new "Hot Release" available. It's called this because it's not a completely stable released but about as close as you can get without tons more testing.
Picture
I've talked about this compiler before and even created a website dedicated to it. When I created my GreatCowBasic.com website, there wasn't much documentation on the compiler. There wasn't an install facility. Setting a programmer up took a lot of steps. There were several different IDEs for it but none of them endorsed by the team.
Many bugs existed and the documentation was poor. Plus there were many requests for new commands. 

So I attempted to make it easier to use with the CHIPINO module as the hardware. Now the compiler has really grown from where it was. It now supports both PIC and AVR micros. I prefer PIC but now people using a CHIPINO can share code with an Arduino user. The SYNWRITE IDE has been improved and become the standard. The help files have been greatly improved. Tons of sample code are now included. Lots of new features and commands are part of Great Cow Basic.
Despite all these improvements, the simplicity of the compiler has been maintained. You can get access to any of the libraries and modify them if you really want/need to. What I like best is it still produces pure assembly code and I can load that into MPLAB or MPLAB X and debug with professional tools.

It really is a great compiler now and the price of FREE cannot be beat. So if you are just getting started with PICs, I highly recommend you look into this compiler. And if you like what you see, get involved, post to the forum, help find any missed bugs. It's truly a community project but far from a limited effort. It could easily sell for $100 or more based on what it can do but it remains free and completely open source for hobbyist or commercial use. 


1 Comment

Great Cow Basic Update

2/23/2015

0 Comments

 
I've been using the Great Cow Basic compiler for Microchip PICs for many years. Probably around 15 years now. I was never a heavy user and in the early days it was a bit limited and difficult to use. That was then and today it's a totally different story. There have been many great contributors to this open source compiler and the creator Hugh Considine is still behind the scenes making improvements. A new version is close to release and hopefully by the time you read this you will see an update dated with a February or March 2015 release.
The compiler has expanded to support both PIC and AVR microcontrollers. A full featured IDE is now available and works great. There have been many new commands added and improved documentation. One thing that was missing in the past was a library of sample code and now that is available too. 
Picture
Evan Venn, a top contributor, worked closely with Hugh and with some key forum members, to expand the compiler and sample code and commands to make it on par with any BASIC compiler out there. 

What I like the best is it produces a pure assembly code file. This allows me to see the core libraries and how they work. It allows me to load the assembly file into MPLAB and run debug mode or on the simulator without any special changes to the file or any special setup requirements. In fact MPLAB doesn't know a BASIC compiler created it. It thinks its a raw assembly code file.
So I suggest you give it another look. I created a separate website at greatcowbasic.com to help make it easier for a beginner to get started but I need to really update that site. The main Great Cow Basic site is a sourceforge website that has improved over time. So give it another look and let me know what you think?
My guess you'll want to try it out.
0 Comments

Tablet for Programming PICs

12/23/2014

1 Comment

 
I've always wanted a low cost way to program PICs and a tablet seemed like a great solution. But most tablets either didn't have a USB port for the programmer or ran an operating system that didn't support the software tools I like to use such as Great Cow Basic and PICkit 2 software. Then I found the Winbook tablets at Microcenter. They offer a very low cost tablet that runs a full version of Windows 8.1 and has as full size USB port. On the smaller ones they are a USB 2.0 and on the larger versions they offer USB 3.0.
Picture
The pre-Christmas deals offered the smallest 7" Winbook for $59.95. It included Windows 8.1, 16GB of Flash Storage and 1GB of RAM. It also has wireless-N and a micro-HDMI port. So I bought one and downloaded the Great Cow Basic IDE at my Greatcowbasic.com site. I then ran the software without issue. The next step was to test the PICkit 2 on the USB port. This worked smoothly as the GCB IDE has the PICkit 2 command line interface built in. The programmer launched and programmed a PIC16F886 on a CHIPINO module without issue. 

I did find that 8GB of the 16GB was taken up by the operating system and other features so the memory size is limited, but plenty for what I was doing, at least I thought so. Then I decided to see if the Davinci 3D printer software, XYZware, would run on it. I downloaded that and it ran fine. I could load a 3D print into my Davinci without issues and the print was launched. My next step was to try and install the ExpressPCB software I like to use for creating circuit boards. Before I did that, I decided I needed a keyboard and mouse first. I tried a bluetooth keyboard but I couldn't it them to connect so I used a USB expander and was able to connect the PICkit 2, USB Keyboard and USB mouse to the tablet and everything worked great.
I also wanted to to see if I could load Chrome on the tablet so I could modify Tinkercad designs but I found the memory usage was already getting low. Seems that Windows did an update and used up a bunch of space. I have to figure out what I can do to get some of that back but my idea of installing ExpressPCB may not be possible either. I guess 16GB isn't enough space. The 32GB is $139.95 but as the price gets higher I may just stick with a low cost laptop. The tablet has a microSD card slot so I'm going to try and load the programs on there and see if I can run everything from the SD card. So I've achieved one goal of programming PICs with a tablet but to create designs, write the software, send the 3D print file for a complete design from a tablet will require more memory with the SD card if that works or spend more money on a larger tablet which is not what I want to do. But at least I know its possible at the simplest of all levels. I can write a Great Cow Basic program and program a CHIPINO module with the code. Not bad at all for $59.95. 
1 Comment

Understanding a PIC .HEX file

3/25/2014

1 Comment

 
I've put together an explanation for Understanding Microchip PIC .hex files many times but when I need it I can't find it. I'm just not organized enough. That is a big part of the reason I've built this website. I now have an online place to store my notes about programming Microchip PICs and all my supporting projects right here in one place. So I put together a detailed summary of how to analyze and understand a .hex file once again and gave it its own page.
Picture
Its on my site now for everyone to view. Check it out and let me know if this helps you in any way. I didn't want to make it too long like some summaries I've seen, but I think I covered the topic well enough to help you understand it. People who want to create their own bootloader for PICs will need to understand this file format so maybe someone will gain from this post.

If you do find this post or any of my blog posts helpful, then help out this site by supporting our sponsors, or clicking on the ad below. I also have an Amazon store now with stuff I recommend. Purchase through my AStore and you pay the same price but Amazon sends me a small royalty. Thanks.
1 Comment

PK2 Updated Device File

3/7/2014

0 Comments

 
I have another PK2 programmer update for you. My PK2 design just got a little better. I wanted to try out the new PIC16F1788 in a CHIPINO module because I noticed that Great Cow Basic Compiler supported it. But I quickly realized that the latest device file for PICkit 2 didn't support it. So it gave me reason to try out the Device File Manager by user name Dougy83.
Picture
The device file manager is a great tool for updating the Device file for PICkit 2 (and my PK2). I used a PIC16F1784 which was supported and made a copy within the tool. Then I downloaded the PIC16F1788 programming spec to get all  

Read More
0 Comments

Great Cow Basic Assembly Files

2/9/2014

2 Comments

 
One of the features I like most about the Great Cow Basic (GCB) compiler is it produces a pure assembly file. I've mentioned this before in a previous post, but what I didn't know it did until recently, was that it can transfer the BASIC command to the assembly file as a comment.

The picture below shows a screen capture from the MPLAB screen that has a GCB generated file. The Basic command lines show up as comments in green. The assembly code shows up below it.
Picture
It turns out this is just a command line option for the compiler. This feature has been automatically set in the design environment included with the Great Cow Basic download at my Great Cow Basic CHIPINO website. What this

Read More
2 Comments

Cofiguration Settings

12/16/2013

0 Comments

 
Configuration settings are one of the more confusing topics to someone just getting started with Programming PIC Microcontrollers and often is the hurdle they have to get over to get that first LED to flash. The configuration settings enable the features of the micro. Settings, such as enabling the Debug feature, Low Voltage Programming or setting the Oscillator to internal or external are just some of the options. 

They are sometimes called fuses since in older one time programmable parts they were set once and couldn't be changed. But with today's modern flash memory devices, the configuration can be changed every time the part is programmed.

The configuration is really just a set of bits that get set or cleared to enable or disable the feature. These bits are grouped together into a byte or several bytes depending on how many features need to be configured.
Picture

Read More
0 Comments

Great Cow Basic----or Great Cow Assembly

6/9/2013

0 Comments

 
Great Cow Basic could actually be called Great Cow Assembly. This is because the compiler produces pure assembly code. By that I mean after running the compiler on your Great Cow Basic code you end up with a .asm file of the same name as your Great Cow Basic file. That .asm file can be directly loaded, built and simulated or debugged right in Microchip's MPLAB.

'A program to flash LED on PIN 13/PORTB5
'Chip model
#chip 16F1829, 16
'Main routine
Start:
 'Turn one LED on, the other off
  SET LATB.5 ON
    wait 1 sec
 'Now toggle the LEDs
  SET LATB.5 OFF
    wait 1 sec
 'Jump back to the start of the program
goto Start



You don't have to tweak anything. The configuration, variables, every command is presented just like you wrote it in Assembly code to start with. The only difference is your Basic commands are now comments.

;Start of the main program
;A program to flash LED on PIN 13/PORTB5
;Chip model
;Main routine
START
; SET LATB.5 ON
   banksel LATB
   bsf LATB,5
;wait 1 sec
   movlw 1
   movwf SysWaitTempS
   banksel STATUS
   call Delay_S
; SET LATB.5 OFF
   banksel LATB
   bcf LATB,5
;wait 1 sec
   movlw 1
   movwf SysWaitTempS
   banksel STATUS
   call Delay_S
;goto Start
   goto START
   BASPROGRAMEND
   sleep
   goto BASPROGRAMEND


I've seen many compilers make assembly files; that's what they do. But I've never seen one produce something so crystal clear as Great Cow Basic. It's really easy to see the assembly code produced from these BASIC commands. 

And what a great way to teach assembly language. Make a simple Basic language program that flashes an LED and then you can see how to setup the port registers, manipulate the bits and even switch banks of memory if needed. It's all done for you in pure assembly language. No hidden macros or cryptic defines. 

It does have some setup routines like the main Initsys subroutine where the registers, that get most beginner's in trouble, are handled for you. It's brilliantly simple and can easily be modified if you are an experienced assembly programmer.I am so impressed with this open source compiler. I plan to do a lot more with it in the future.

INITSYS
;OSCCON = OSCCON OR b'01111000'
movlw 120
banksel OSCCON
iorwf OSCCON,F
;SET ADCON0.ADON OFF
bcf ADCON0,ADON
;SET ADFM OFF
bcf ADCON1,ADFM
;ANSELA = 0
banksel ANSELA
clrf ANSELA
;ANSELB = 0
clrf ANSELB
;C2ON = 0
banksel CM2CON0
bcf CM2CON0,C2ON
;C1ON = 0
bcf CM1CON0,C1ON
;PORTA = 0
banksel PORTA
clrf PORTA
;PORTB = 0
clrf PORTB
;PORTC = 0
clrf PORTC

return

0 Comments

Graphic LCD

5/29/2013

3 Comments

 
I've wanted to get a graphic LCD working for a long time but never could find the time to read through all the data sheet info and then develop the code. It was a great surprise when I found that the Great Cow Basic compiler had built in support. Problem is the documentation was missing. So I sorted through the header file and was able to get a KS0108 128x64 LCD to work directly with a CHIPINO mini module.
Picture
The commands are structured so that ASCII characters don't start displaying until 15 decimal. So I created a looping program that displayed the decimal number for the ASCII character and then drew a box that contained the ASCII character so I could verify the capability.

The Great Cow Basic compiler has commands to draw ASCII phrases and individual characters. It can also draw lines both horizontal and vertical and also an open or filled box.

More detail can be found at the greatcowbasic.com sample programs page.
3 Comments

8x8 Dot Matrix Shield

5/15/2013

0 Comments

 
Picture
I bought one of these matrix shield kits on ebay. I had to search a little for the assembly instructions and schematic which were not included but after getting all that sorted out I was able to make a sample program to display ASCII characters using a CHIPINO module and Great Cow Basic.

The project can be downloaded from the GreatCowBasic.com website under the Sample Projects section. It's a start and I hope to create more in the future. 

Getting the correct orientation and pixel settings was a bit difficult but to help create the characters I used one of the many character creator applications on the web.
Here are a few of the best ones I found:
Pattern Library
LCD Creator
Character Calculator

0 Comments
<<Previous

    Categories

    All
    3D Printer
    Chipaxe
    Chipino
    Chipkit
    CNC
    Copper Connection
    Dot Matrix
    Elproductsnews
    Expresspcb
    Graphic Lcd
    Great Cow Basic
    Kickstarter
    Lcd Shield
    Makefaire
    Makercase
    Maximite
    Microchip Pic
    Pickit 2
    Pickit 3
    Videos

    Visit previous blog posts in the archives below.

    Archives

    February 2018
    October 2017
    September 2017
    July 2017
    November 2016
    August 2016
    July 2016
    May 2016
    March 2016
    January 2016
    November 2015
    September 2015
    August 2015
    July 2015
    June 2015
    April 2015
    March 2015
    February 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    July 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    October 2012
    October 2011

    RSS Feed



    About Chuck

    Chuck has been programming with PIC Microcontrollers since there were only five devices. Now there are over 700 and growing. He also has a lot of fun 3D printing designs using his Davinci 3D printer and TinkerCad software. In this series of blog posts and occasional videos on his YouTube Channel he tries to help you get started with electronics and 3D printing.

    Disclaimer

Powered by Create your own unique website with customizable templates.