Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:30 26 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 : Home Grown Pic Assembler/Programmer

Author Message
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 12:00am 30 Dec 2012
Copy link to clipboard 
Print this post

Hello all,

A long time ago, I wrote a Pic assembler cum programmer in QBasic then Turbo Pascal and eventually translated it to VB6. My main beef was the inability of VB6 to do comm ports greater than comm9 which meant having to renumber ports in device manager (no good for passing the application to other pc illiterate parties.

I now have VB 2010 express and have just managed to get it to send and receive binary data - what a headache. So much of the way things were done in VB6 has changed radically in VB 2010.

Are there any VB 2010 gurus on TBS that I can call on for a panadol occasionally?

David M
David M.
 
James_From_Canb

Senior Member

Joined: 19/06/2011
Location: Australia
Posts: 265
Posted: 06:37pm 30 Dec 2012
Copy link to clipboard 
Print this post

If you can't find an expert on TBS, there are lots of forums that support VB programming.

I'd suggest you look at C#. I've seen quite a few postings on forums saying that Microsoft wants to drop VB and that C# is their preferred successor. The language structure is similar and not too difficult to pick up.

If you decide to stick with Microsoft VB, use the 2012 Express version. Support for the 2010 version will be stopped soon, if it hasn't already.

I haven't tried it, but other TBS users have recommended Liberty Basic.

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: 06:52pm 30 Dec 2012
Copy link to clipboard 
Print this post

  James said  other TBS users have recommended Liberty Basic


Thanks James, I'll give it a good look over. My main concern is ease of use of comm ports in both text and binary tx/rx. Also need full range of comm ports not just limited to 9.

I got VB 2010 because it is free and I thought it would translate easily from VB6. Well, it might too when I get my head around the new structures.

I have managed to get both text and binary data to tx/rx, but now have to make it fit in my original code sequence.

C#?? I hope it is not too many tricks to teach this old dog.

David M.
David M.
 
James_From_Canb

Senior Member

Joined: 19/06/2011
Location: Australia
Posts: 265
Posted: 08:09pm 30 Dec 2012
Copy link to clipboard 
Print this post

Here's a link to a simple serial connection in C#. They say:
  Quote  Here's a simple Windows serial communication program you can write yourself in 10 minutes. Microsoft's FREE Visual C# Express with the .Net Framework now includes a serial port class that eliminates the cumbersome setup for threads and overlapped I/O. They've made serial communication easy again. This project can readily be adapted to a variety of applications requiring serial communication.


Here's a link to the Microsoft site with a description of the serial port class. The class should take care of all the hard stuff and leave you to fill in the 'easy' bits :) It also has examples of VB and C# (C Sharp) code at the bottom of the page.

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: 08:16pm 30 Dec 2012
Copy link to clipboard 
Print this post

Thanks James,

that looks like what I'm after. Just need to get hold of a free version of C# now.

David M.
David M.
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 12:46pm 31 Dec 2012
Copy link to clipboard 
Print this post

I was a big fan of VB6 too, and still use it from time to time. When VB.net replaced VB6, I struggled to adopt it. There were too many changes in the way everything worked for a old programmer to adopt, and the run time files were just too big.

While looking for an alternative to VB.net, I found Liberty Basic, and its free version, JustBasic. Just Basic uses a smaller run time file and a token file, making distribution dead easy. It can use as many com ports as your hardware supports. Learning JustBasic was not to difficult, lots of examples and a active forum helped.

I now use JustBasic for any new projects, except where I specifically need VB.net functions. http://justbasic.com/

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 12:53pm 31 Dec 2012
Copy link to clipboard 
Print this post

  Glenn said  While looking for an alternative to VB.net, I found Liberty Basic, and its free version, JustBasic


I had a browse through the Liberty Basic site and understand (I think) that it runs as an interpreter not as a compiled programe. Does it produce an executable file, i.e. can a programme written in LB be installed on another machine without the need to have LB also on the same PC?

David M.
David M.
 
vk4tec

Senior Member

Joined: 24/03/2012
Location: Australia
Posts: 239
Posted: 01:44pm 31 Dec 2012
Copy link to clipboard 
Print this post

If you dont want a GUI, try perl for windows .

It is a scripting langauge.

Like basic, and heaps of libraries.

Use it all the time.

- Andrew -
Andrew Rich VK4TEC
www.tech-software.net
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6098
Posted: 01:54pm 31 Dec 2012
Copy link to clipboard 
Print this post

David,
With the current version of Liberty Basic, you need to distribute a "compiled" token file and the executable and a few DLL files.

Creating the distributable package is easy.

MM Edit is written in Liberty Basic.
http://www.c-com.com.au/MMedit.htm

The next version of LB (due out on a year or so) should be able to produce a single executable.

Most of the time, I have to include a few extra DLL's and a pile of data files so the lack of a single executable makes no difference to me.

Jim
VK7JH
MMedit   MMBasic Help
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 02:13pm 31 Dec 2012
Copy link to clipboard 
Print this post

  Jim said  Creating the distributable package is easy.


Is it a function of LB that automatically bundles the required files for distribution, or is it a manual pick and choose affair?

David M.
David M.
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 02:33pm 31 Dec 2012
Copy link to clipboard 
Print this post

The run time file is about 500k, and the token file is tiny, maybe 10 to 40k, depending on how complex you program is.

The way its works is clever. Say I write a program called MyProgram, and I want to distribute it. I rename the run time file to MyProgram.exe, and I create a token file ( its a option in the menu ), called MyProgram.tkn, and I distribute them together. When the end user runs MyProgram.exe, it looks for a token file of the same name, in this case MyProgram.tkn. The token file is your program.

If you want to release a updated version, you just send the updated token file, as they already have the run time file.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 02:40pm 31 Dec 2012
Copy link to clipboard 
Print this post

  Glenn said  The way its works is clever. Say I write a program called MyProgram, and I want to distribute it. I rename the run time file to MyProgram.exe, and I create a token file ( its a option in the menu ), called MyProgram.tkn, and I distribute them together. When the end user runs MyProgram.exe, it looks for a token file of the same name, in this case MyProgram.tkn. The token file is your program.

If you want to release a updated version, you just send the updated token file, as they already have the run time file.


Thanks Glenn, I'm liking it already.

As the grey matter is ageing rapidly, I need to keep things as simple as possible.

David M.
David M.
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1425
Posted: 03:25pm 31 Dec 2012
Copy link to clipboard 
Print this post

There is also robotbasic (robotbasic.com) which can make a single .exe file.
Micromites and Maximites! - Beginning Maximite
 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 03:35pm 31 Dec 2012
Copy link to clipboard 
Print this post

  CircuitGizmos said  There is also robotbasic (robotbasic.com) which can make a single .exe file


Soooo many options...what is the general concensus?

Incidentally, do you know of an outlet for the little Pic based I2C modules I design, other than posting on TBS?

David M.
David M.
 
Print this page


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

© JAQ Software 2024