Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:53 28 Nov 2024 Privacy Policy
Jump to

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 : Microcontroller and PC projects : 8 bit pic assembly language

Author Message
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 02:28am 07 Feb 2014
Copy link to clipboard 
Print this post

I get a kick out of programming 8 bit PICs in assembly language. I guess it is a hang over from 8 bit MPU days.

Are there any other loonies in TBS that do the same?


David M.
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 02:33am 07 Feb 2014
Copy link to clipboard 
Print this post

I am a loonie, just starting with pic assembly.
In my past there were many Z80 assembly coding days, so i should be able to figure it out.
Your example for the I2C is under study. :)
Did you see the design i made for the I2C LCD board?
It is here..


Microblocks. Build with logic.
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 04:36am 07 Feb 2014
Copy link to clipboard 
Print this post

  MOBI said   I get a kick out of programming 8 bit PICs in assembly language. I guess it is a hang over from 8 bit MPU days.
Are there any other loonies in TBS that do the same?


Count me in. Though I cheat a little.
I use Great Cow Basic compiler to produce the initial code and then modify from there as necessary.

What I love about this compiler over other BASIC compilers is it produces a pure assembly code file.
I can write in GCBasic, compile and then load the resulting .asm file into MPLAB for debugging with the simulator without any modification.

From there I can modify but because GCBasic produces pure assembly I can also insert assembly right in between the basic code without any special commands.

It's like having a pre-built library of assembly code files ready to use at any time.
www.elproducts.com
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 04:44am 07 Feb 2014
Copy link to clipboard 
Print this post

Another thing I use is the Real PIC Simulator .
You just load in the .hex file and it disassembles the code back to assembly.
Then you can add different components to the design, run the code, set breakpoints, add oscilloscope to watch signals. Its a great tool if you don't mind working in assembly.




www.elproducts.com
 
plasma
Guru

Joined: 08/04/2012
Location: Germany
Posts: 437
Posted: 06:01am 07 Feb 2014
Copy link to clipboard 
Print this post

great tricks elproducts !

thx for the hint.
 
Lou

Senior Member

Joined: 01/02/2014
Location: United States
Posts: 229
Posted: 09:31am 07 Feb 2014
Copy link to clipboard 
Print this post

I get a kick out of programming 8 bit PICs in assembly language. I guess it is a hang over from 8 bit MPU days.
Are there any other loonies in TBS that do the same?

I guess I'm one of those loonies, we used to call it crazy's working in the rubber room. The lights were never on in the rubber room, the glow from our CRT's provided all the light and heat we needed, we did new product design for a small company in St. Louis, Mo.

Count me in on this group. Me and John (Zonker on this forum) worked together for 25 years using machine code on the Z-80 and various Motorola microcontrollers. I'm retired on a small farm continuing my work with 8-bit PIC micro's using assembly and the MicroChip ICD3 with MPLAB IDE.

I'm having lots of trouble trying to step up to the MPLAB X IDE, anyone else having trouble or am I just old school and hate confusing changes ??

This is my first post to the Back Shed, thought I'd give you guys some background.

I'm very interested in the Great Cow Basic compiler elproducts mentioned. I will be looking seriously into GCBasic, thanks elproducts for the info and thanks MOBI for starting this thread.

John got me on this forum a month ago with the Color MaxiMite, MiniMite and now with the MicroMite. What a great thing Geoff has done. I have several boards running various MicroMite projects and doing some beta testing and playing. Good time to play with 5" of snow on the ground.

Lou

Microcontrollers - the other white meat
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 11:55am 07 Feb 2014
Copy link to clipboard 
Print this post

MPLAB X can be a little tricky at first but after a while you'll find it has many advantages.
One being it will run on Mac and Linux.
Here is a free training tutorial on MPLAB X from Microchip. It uses the PIC24 for the examples but it all applies to 8-bit and 32 bit as well.

MPLAB X Training

As far as Great Cow Basic, I set up a dedicated website for it at the link below. I have some sample programs and some information for those wanting to know more. I wrote a manual for it that you can download form the site.
Check it out and give me your feedback where I can make it better. It's still a work in progress. I do focus on using it with the PIC16F886 based CHIPINO module but you can use it with any 8-bit PIC.

My Great Cow Basic Website

I also created an installation file that includes the excellent GCB@SYN IDE which is like a simplified MPLAB. It was created by a couple of members of the GCB forum. It installs on your hard drive and shows up in your start menu. PICkit 2 is already incorporated so you can one click build and program a PIC.
www.elproducts.com
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 12:10pm 07 Feb 2014
Copy link to clipboard 
Print this post

  lou said  I'm having lots of trouble trying to step up to the MPLAB X IDE, anyone else having trouble or am I just old school and hate confusing changes ??


Hi all. I almost didn't expect any reply let alone a mountain. It is good to know I'm not the only loony out there.

I started off in PICs using ICProg which could also disassemble a .hex file to ascii. The only problem was, I didn't have a way of assembling code that I wrote, so I sat down and wrote a VB6 programme to assemble the code and then programme the PIC. It was only designed to work with 8 bit PICs. The programming was done using RS232 CTS RTS etc as signalling lines.

Then I got the laptop and you guessed it, no comm ports!!!! USB serial cables worked but were dead slow (make and drink a cup of coffee, slow!) So I sat down again and made a pic (F88) based interface so the PC could talk to the PIC interface using serial commands and the PIC would control the signalling lines to SiliconChip programmer. Works well.

Then came MPLAB X IDE !!!! Aside from taking forever to load up, it has different ways of doing things to other assemblers. E.g. - Labels must start in a certain column. What happened to just putting a colon after the label? I am getting used to it though especially since I lashed out and bought a PicKit3.


David M.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 01:10pm 07 Feb 2014
Copy link to clipboard 
Print this post

Back about the end of the 80's, when I had just about done everything that my failthful old Atari 800XL's BASIC could do, I was looking at starting to write machine language.

As ALL of the commercial games of the time were written in machine language(for it's speed and ability over BASIC no doubt), it was something I started to look at, but lost interest pretty quick.

That, and and having just started an apprenticeship as an electronics service technician, I had PLENTY of other stuff to learn about the intracies of how CRT TV's, VHS VCR's and various stereos worked, to be able to spend any time on machine language.

The very thought of it now makes my brain go numb - it always seemed to me, like such a complicated language, but then, I guess it IS(until you master it), so that is where various BASIC interpreters started to surface, to make it easier for people to write programs.

The BASIC's all suffered one thing - speed. Most of them were relatively slow, being that the interpreter has to run in the background. However, with a modern BASIC like Geoffs, speed does not really seem to be much of an issue these days. The Atari ran at the glorious speed of 1.8MHz Still, something nice about a 1.8MHz machine still being well fast enough to beat you at many user-vs-computer games of the time!Edited by Grogster 2014-02-08
Smoke makes things work. When the smoke gets out, it stops!
 
James_From_Canb

Senior Member

Joined: 19/06/2011
Location: Australia
Posts: 265
Posted: 06:28pm 07 Feb 2014
Copy link to clipboard 
Print this post

I was a professional assembler programmer for a couple of years. I found the biggest advantage to me (as opposed to advantages to the user like speed) was the simplicity of debugging. There were memory dumps of code and of data, all in hex, so you could work out what had gone wrong. I ended up being able to decode hex data by looking at it and reasonably good at patching code in raw hex.

Oh to have my brain working that well again.

But I guess it's what they say. Get around 10,000 hours experience and you'll become an expert. That's more than most people can spend on a single language now though. There are too many new and improved ones being developed to have that luxury. I didn't have any choice. The language was the only efficient one available for Perkin-Elmer 32 bit minicomputers at the time, and it was the organisational standard.. Work there for a few years and it was easy to get the hours up.

And to compare the old minicomputers to what we're using, we ran quick programs on machines with dumb terminals, 64Kb of memory and a 67mb drive. MOBI might remember the old SOAP system.
My mind is aglow with whirling, transient nodes of thought careening through a cosmic vapor of invention.

Hedley Lamarr, Blazing Saddles (1974)
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 06:48pm 07 Feb 2014
Copy link to clipboard 
Print this post

  MOBI said  
Then I got the laptop and you guessed it, no comm ports!!!! USB serial cables worked but were dead slow (make and drink a cup of coffee, slow!) So I sat down again and made a pic (F88) based interface so the PC could talk to the PIC interface using serial commands and the PIC would control the signalling lines to SiliconChip programmer.


Would love to see more detail on that.
www.elproducts.com
 
VK2MCT
Senior Member

Joined: 30/03/2012
Location: Australia
Posts: 120
Posted: 06:50pm 07 Feb 2014
Copy link to clipboard 
Print this post

Count me in as a loon too.

In the daze before daisywheel printers, I acquired an IBM golfball typewriter, but with about a dozen relays in the base & a 100 pin connector out the back.

I built an interface that took 1200baud in and activated the appropriate relays.

It used a signetics 2650 brain and 16450 uart.

All assembly lang.

It printed high quality, but noisy as anything.

John B
VK2MCT
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 07:08pm 07 Feb 2014
Copy link to clipboard 
Print this post

  JohnB said   I acquired an IBM golfball typewriter


Small world. I got a few from navy contacts. One was an ASR with optical tape reader, so I interfaced at the optic side. The processor was the Mostek 6502. As I recall, the big thing (well one of them) about the Signetics (or was it synertech?)2650 was that it was a static machine and could work at clock speeds down to almost dc.

But you are right about the noise. I had to line my hobby room in Queanbeyan so as not to annoy the neighbours late at night.

So what assembly language programming do you do now? PICs, AVR, Ti?


@James---The only SOAP I remember was a Navy stores optimisation programme. Don't tell me you were connected with the RAN?Edited by MOBI 2014-02-09
David M.
 
James_From_Canb

Senior Member

Joined: 19/06/2011
Location: Australia
Posts: 265
Posted: 11:47pm 07 Feb 2014
Copy link to clipboard 
Print this post

MOBI: Yep. A Navy Supply programmer for quite a few years. Prior to that I ran the computer room at the Navy Supply Centre at Zetland - the old British Leyland site. The entire warehousing system fitted on 300Mb of disk storage. The SOAP warehouse was close to our computer room.

James
My mind is aglow with whirling, transient nodes of thought careening through a cosmic vapor of invention.

Hedley Lamarr, Blazing Saddles (1974)
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 11:54pm 07 Feb 2014
Copy link to clipboard 
Print this post

  Quote  Navy Supply Centre at Zetland


I know it well. Many visits with EDP form in hand to get an obscure part for a Model 28 teleprinter or 23V radio transmitter tuning coil or similar.

A mate of mine had a classic ford falcon and parked it in the old stores compound for security a few years ago. He may as well have left it in the street as that's when there was a massive hail storm with stones the size of cricket balls. Just as well insurance coughed up. Still, he wasn't a happy chappy.
David M.
 
donmck

Guru

Joined: 09/06/2011
Location: Australia
Posts: 1313
Posted: 10:08am 08 Feb 2014
Copy link to clipboard 
Print this post


Just to add a little more depth to this interesting thread, please read:
http://www.dontronics-shop.com/is-this-australias-first-pc.h tml

See also:
http://www.dontronics.com/z80.html
I converted an 8080 tiny basic into what I called Z8TBasic.

I did all of my early PIC programming in assembly, then converted across to using many versions of PIC Basic, including the Parallax version. See:

The PIC Source Book was written in 1993 by Scott Edwards to provide users of the ParallaxPIC programming tools with a ready-made collection of assembly code in Parallax assembly mnemonics.(see below) At the time, there were four PICs: 16C54, 55, 56, and 57.

When he stopped selling it, he allowed me permission to publish it on the web:
http://www.godzillaseamonkey.com/pic-source-book/

This is all very old school, but I hope there is some interesting reading for TBS members.

BTW I am basically retired these days, and letting my brain chill out for a while.

Cheers Don...


https://www.dontronics.com
 
Lou

Senior Member

Joined: 01/02/2014
Location: United States
Posts: 229
Posted: 11:06am 08 Feb 2014
Copy link to clipboard 
Print this post

Don, the TRS80 pictures really brought back memories of the early days!! My TRS80 had a hand built interface board with a blue Zif socket, that's how I programmed my first 2k EPROM, a $20 part at that time. That was around 1979 or 80.

Around 1982 I moved up to a CPM system built around a Z-80 Ferguson board with 64k of memory, a full boat at the time. It had two 8" floppies I think 250kb each, that mass storage sure beat the cassette interface of the TRS80. Later I even put on a surplus 5mb hard drive, I thought at the time 'who could ever fill that up?'.

Of course then in the mid 80's I went to a PC with the 20mb hard drive and the math co-processor. I had an ISA Z-80 board plugged into it so I could continue to write assembly code for my Z-80 projects. That code was hand banged, I didn't even have an assembler at the time.

Now we got all these great microcontrollers - the other white meat, I love it.

Great memories.

Lou
Microcontrollers - the other white meat
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024