Printable Version | Subscribe | Add to Favourites
<<  1    2  >>
New Topic New Poll New Reply
Author: Subject: PIC programmer help
02GF74

posted on 27/2/06 at 11:07 AM Reply With Quote
PIC programmer help

I finally got round to buying the Velleman VM111 PIC programmer and experimentation board as it is on special offer at Maplins!

I am posting here as I think I remember reading about the problem that I appear to have on here or maybe someone else is using the kit who had the same problem, so here goes:


I have problem communicatiing to the board. Here is what I have done.

1. connected it to 12 V DC regulated power supply; (I also tried it with a 15 V unregulated) . The green LED (power) is on.

2. connected the serial cable to COM1 of my laptop, DELL D600.

3. run the assembler program, MPASMWIN on demo1 example; no errors.

4. run PIC prgrammer program, PROGPIC2.exe and open file demo1.HEX

5. put switch to position PROG (big red LED flashes, Read/Write red LED is on)

Everything up to now is as per the manual.

6. I select Port/COM1, the Read/Write red LED goes off and I see the error:

K4048 not found at COM1.

When I select ok, the pop up disappears and once more the Read/Write red LED is on.

I had a quick check of devices installed on my laptop and no device uses IRQ 3. (manual states that 3 and 4 should not be used by anything but COM1).

It shows me that COM1 uses IRQ 4 and I have internal modem fitted on COM 3 using IRQ 5 so there does not seem to be a conflict with interrupts.

Anyone know what the problem is? Is there any diagnostics I can run to find out more about the problem?

I seem to recal that a USB-> serial jobbie was needed - anyone know about this?

Thanks.

View User's Profile View All Posts By User U2U Member
rusty

posted on 27/2/06 at 03:58 PM Reply With Quote
All I will say is if your not using anything like the modem or parallel port just disable it in the BIOS and give that a go.

Not many people use a modem and most printers use USB now so you should be ok.

View User's Profile View All Posts By User U2U Member
MikeRJ

posted on 1/3/06 at 08:23 PM Reply With Quote
Just checked out that programmer, I'm really surprised that Velleman would produce such shoddy device to be honest, they have a reputation for quality kits.

The problem, almost certainly, is that due to power constraints, many laptops do not provide the usual +-12 volts signal levels from their RS232 ports, usualy it's quite a bit lower.

Many cheap and cheerfull PIC programmer designs rely on the higher voltages being present (and are therefore not actualy RS232 compliant). A USB/serial adapter might well do the trick, but they can cause their own problems.

One thing I would say is that you must use an unregulated adapter. These designs rely on the high output these adapters produce when unloaded in order get sufficient voltage to put the PIC into programming mode (most PIC's need around 13 volts, and there is often a regulator on the programmer that has around 2 volts overhead). A regulated 12volt adapter will almost certainly cause problems. 15volts should be enough...

Don't disable the COM port either, that will prevent the software working altogether!

[Edited on 1/3/06 by MikeRJ]

View User's Profile View All Posts By User U2U Member
02GF74

posted on 1/3/06 at 09:18 PM Reply With Quote
ta for that. are you using the velleman kit?

I did knock up an unregulated supply; o.c. was sowing about 19 V so I put a load resitor to take it donw to 15 V.

Maybe I'll put a smaller value on to see what happens? (it cna only go up in smoke!).

Another option is to put circuit in the serial line to give +/1 12 V signals.

View User's Profile View All Posts By User U2U Member
MikeR

posted on 1/3/06 at 11:40 PM Reply With Quote
can you let me know how you get on as i'd really like to get this kit and do the same!

what programmming stuff have you got?

How are you designing the circuit board its interfacing with ?

View User's Profile View All Posts By User U2U Member
iank

posted on 2/3/06 at 08:35 AM Reply With Quote
If you haven't already bought a pic programmer you might want to look at the cheap ones microchip are doing at the moment (for around £20-30). Prebuilt (and hopefully tested ) and some come with an eval board. Run from USB as well so none of that serial PITA.

Farnell have them

http://uk.farnell.com/jsp/endecaSearch/searchPage2.jsp?Ntt=pickit2&Nty=1&N=401&Ntk=gensearch

View User's Profile View All Posts By User U2U Member
MikeRJ

posted on 2/3/06 at 02:47 PM Reply With Quote
quote:
Originally posted by 02GF74
ta for that. are you using the velleman kit?



No. Many years back I made a selection of different cheapo programmers, and they all have various limitations, and they can be an utter ball ache to get working. Since I am now a firmware engineer, I have the "proper" tools at work, and I bought myself an ICD2 for use at home. Very usefull bit of kit if you are thinking of getting more involved with PIC developement.

quote:

I did knock up an unregulated supply; o.c. was sowing about 19 V so I put a load resitor to take it donw to 15 V.



When you say "load" resistor, did you have it connected accross the supply rails or have it in series? If in series this would cause problems as the current requirement varies depending on if the programming voltage is enabled, which would cause a voltage fluctuations.

quote:

Maybe I'll put a smaller value on to see what happens? (it cna only go up in smoke!).

Another option is to put circuit in the serial line to give +/1 12 V signals.



Do you have a desktop machine you can try it with?

View User's Profile View All Posts By User U2U Member
MikeR

posted on 2/3/06 at 06:55 PM Reply With Quote
quote:
Originally posted by iank
If you haven't already bought a pic programmer you might want to look at the cheap ones microchip are doing at the moment (for around £20-30). Prebuilt (and hopefully tested ) and some come with an eval board. Run from USB as well so none of that serial PITA.

Farnell have them

http://uk.farnell.com/jsp/endecaSearch/searchPage2.jsp?Ntt=pickit2&Nty=1&N=401&Ntk=gensearch


ok, so i want to create something that will read 4 analogue inputs and dsiplay them on 4 led bar lines. Also count an input and over time if the count gets above a certain value light 1 of 3 or 5 LEDS

(ie measure fuel, water, oil T, oil P + revs)

which one do i go for?

View User's Profile View All Posts By User U2U Member
02GF74

posted on 2/3/06 at 10:09 PM Reply With Quote
quote:
Originally posted by MikeR


ok, so i want to create something that will read 4 analogue inputs and dsiplay them on 4 led bar lines. Also count an input and over time if the count gets above a certain value light 1 of 3 or 5 LEDS

(ie measure fuel, water, oil T, oil P + revs)

which one do i go for?



I can only recommend what is for sale at maplins.

One suitable for your app is : PIC12F675

cost: £ 1.49 8 1K 64
I/O lines : 6
four 10 bit A/D converters


bear in mind I have not go as far as developeing any of my own stuff due to the probelms I'm having.

View User's Profile View All Posts By User U2U Member
02GF74

posted on 2/3/06 at 10:13 PM Reply With Quote
quote:
Originally posted by MikeRJ
[
quote:

I did knock up an unregulated supply; o.c. was sowing about 19 V so I put a load resitor to take it donw to 15 V.



When you say "load" resistor, did you have it connected accross the supply rails or have it in series? If in series this would cause problems as the current requirement varies depending on if the programming voltage is enabled, which would cause a voltage fluctuations.

quote:


it was across the output. ... bit all that is academic as far as I can tell. I printed out the board circuit diagram and the incoming voltage is regulated on board to 12 V so I cannot see what the guy from Velleman is on about suggesting a larger supply voltage, unregulated too.

View User's Profile View All Posts By User U2U Member
MikeRJ

posted on 2/3/06 at 10:39 PM Reply With Quote
quote:
Originally posted by 02GF74
quote:
Originally posted by MikeR


ok, so i want to create something that will read 4 analogue inputs and dsiplay them on 4 led bar lines. Also count an input and over time if the count gets above a certain value light 1 of 3 or 5 LEDS

(ie measure fuel, water, oil T, oil P + revs)

which one do i go for?



I can only recommend what is for sale at maplins.

One suitable for your app is : PIC12F675

cost: £ 1.49 8 1K 64
I/O lines : 6
four 10 bit A/D converters



Not enough IO, I think Mike wants 4 x 10LED bars. This will need 10+4 outputs to drive the LED's (multiplexed) and 4 analog inputs. A 28 pin device such as the 16F873 would be perfectly adequate for the task.

View User's Profile View All Posts By User U2U Member
MikeRJ

posted on 2/3/06 at 10:41 PM Reply With Quote
quote:
Originally posted by 02GF74
it was across the output. ... bit all that is academic as far as I can tell. I printed out the board circuit diagram and the incoming voltage is regulated on board to 12 V so I cannot see what the guy from Velleman is on about suggesting a larger supply voltage, unregulated too.


Because a typical 3 pin regulator such as the 7812 needs around 2 volts of headroom to regulate properly. You may well find a resistor or a diode or two in the common pin of the regualtor to "jack up" the voltage to the required 13 or so, in which case the minimum input requirement jumps to 15 volts.

View User's Profile View All Posts By User U2U Member
paulf

posted on 19/3/06 at 09:26 PM Reply With Quote
How did you get on with this in the end ?
I bought one on impulse from maplins the other day .Ive not tried it yet but notice that the software doesnt appear to include the pic coding software just the assembler and programming software.
Paul.
quote:
Originally posted by 02GF74
ta for that. are you using the velleman kit?

I did knock up an unregulated supply; o.c. was sowing about 19 V so I put a load resitor to take it donw to 15 V.

Maybe I'll put a smaller value on to see what happens? (it cna only go up in smoke!).

Another option is to put circuit in the serial line to give +/1 12 V signals.

View User's Profile View All Posts By User U2U Member
02GF74

posted on 20/3/06 at 12:05 PM Reply With Quote
To follow on; I purchase rs232 transceivers (these convert to rs232 voltage and have on board voltage triplers) but still no joy.

I returned it to maplins for a credit note.

I looked on farnell but the kit they sell does not do the 28 pin (not sure if that is important).

I have circuit diagram for the farnell & maplin programmers and reckon I will have a go at making my own plus write the software myself to download it (I have the compiler that produces the S-record so sending that down com1 should not be that hard to do).

in short, no inffo. to help you.

View User's Profile View All Posts By User U2U Member
Rob Lane

posted on 20/3/06 at 12:22 PM Reply With Quote
Try a look at these :-

Simple PIC programmer

Dirt cheap.

I personally used the PW Tutor board from way back. It allows a certain amount of simple testing as well as programming.

I used it with serial LCDs as display drivers.

[Edited on 20/3/06 by Rob Lane]

View User's Profile E-Mail User View All Posts By User U2U Member
MikeRJ

posted on 20/3/06 at 01:14 PM Reply With Quote
quote:
Originally posted by paulf
How did you get on with this in the end ?
I bought one on impulse from maplins the other day .Ive not tried it yet but notice that the software doesnt appear to include the pic coding software just the assembler and programming software.
Paul.


What do you mean by PIC coding software?

View User's Profile View All Posts By User U2U Member
MikeR

posted on 20/3/06 at 05:53 PM Reply With Quote
quote:
Originally posted by Rob Lane
Try a look at these :-

Simple PIC programmer

Dirt cheap.

I personally used the PW Tutor board from way back. It allows a certain amount of simple testing as well as programming.

I used it with serial LCDs as display drivers.

[Edited on 20/3/06 by Rob Lane]


Rob, i think i either love or hate you! That company seems to do the perfect board for what i want to do. So, water, oil, fuel, miles & speed all logged and displayed via LED while driving ..... heck i didn't want speed and miles before

Shame its not winter, would have given me a good excuse for staying in the house!

View User's Profile View All Posts By User U2U Member
MikeRJ

posted on 20/3/06 at 07:30 PM Reply With Quote
Mike,

Which board are you refering to?

View User's Profile View All Posts By User U2U Member
MikeR

posted on 20/3/06 at 07:47 PM Reply With Quote
Just realised how cold it is outside (been in the garage!)

8 chanel data logger + LCD display

Thinking again, i've contacted the guy who made Dash 7. Seems easier to just re-use his invention (chicken i know!)

View User's Profile View All Posts By User U2U Member
tks

posted on 20/3/06 at 08:16 PM Reply With Quote
Mhh

i would recommend the picallw programmer.

It programs every Microchip and many other brands!! sow its only one investment. in fact its a dynamic programmer and you can easy add devices to the device list to inform the programmer of its limits / options

It uses the Lpt1 port on the Pc, sow laptops stays in the run(used it many times in the garage with my Acer).

For simple things i would start looking arround and searching for an compiler to hex, because its just alllot easyer as assembly and for our hobbie purposes just as nice.

In our application there will always be cpu overkill sow the performance we "lose"
isn't huge.

All my car electronics are made with the pic cpu's. my 1button gearchange, dashboard and in the future the mp3 player....

Bear in mind that for Fast Development you better can use an bootloader wich in fact is a program wich programas a new program in the chip. They are much faster
as the complete chip programmers...

the nasty thing is that the first time you need a programmer to programm the bootloader in the chip.

You will soon build your own tools like an RS-232 board sow you can debug / bootloader program your programs...

For production you can always HARD program the into the chip..

TKs

[Edited on 20/3/06 by tks]





The above comments are always meant to be from the above persons perspective.

View User's Profile View All Posts By User U2U Member
paulf

posted on 20/3/06 at 09:12 PM Reply With Quote
I meant the compiler for writing the program, is there an easily available version suitable for a beginner to learn with?
paul.
quote:
Originally posted by MikeRJ
quote:
Originally posted by paulf
How did you get on with this in the end ?
I bought one on impulse from maplins the other day .Ive not tried it yet but notice that the software doesnt appear to include the pic coding software just the assembler and programming software.
Paul.


What do you mean by PIC coding software?

View User's Profile View All Posts By User U2U Member
MikeR

posted on 20/3/06 at 10:28 PM Reply With Quote
I'm starting to think do it yourself again (yeah i do change my mind as often as as woman).

But i'd really like a free C compiler. Had a browse on the source forge (ie gun licenese) site and they have some pic stuff.

View User's Profile View All Posts By User U2U Member
paulf

posted on 20/3/06 at 10:53 PM Reply With Quote
Apparently the pic software is MPLAB some references to it in docs with programmer but need to find a download for it.
Paul.

View User's Profile View All Posts By User U2U Member
MikeRJ

posted on 20/3/06 at 11:04 PM Reply With Quote
PIC's are an ideal opportunty to learn and use assembler. They have only 35 instructions, and very simple addressing modes meaning you can pick it up very quickly, and of course you can generaly pack more code in with hand assembled code with little experience. It's also worth learning assembly for using higher level languages, it makes debugging much easier.

The SDCC (small devcice C compiler) is the only GNU C compiler I know of. However, though it's great for Z80, PIC support is quite buggy, best avoided unless you have significant experience.

There are various other C compilers, the best of which is generaly regarded as the HiTech compiler (which I use at work). The full version is a somewhat non-locost $950(Austrailan) which is about £390.

However, they have a free version called PICC-Lite that is limited in the device support and amount of code it will compile. Fortunately, it covers the 16F877 which is a 40 pin device, though you can use only 2 ram banks and 2k of the possible 8k. With some care this will easily be enough to write a reasonably sophisticated bargraph type display.

http://www.htsoft.com/products/PICClite.php

There is a good forum for support and general programming questions at http://www.htsoft.com/forum/all/categories.php/Cat/0 and also some good code examples at http://www.microchipc.com

There are also a few basic compilers around, such as PicBasic Pro, XCSB, Proton Plus and several others. XCSB is by far the most professionaly biased product, but any of these would be suitable for simple hobby applications. Personaly I would stick to C as it's a far more portable skill, but I just checked and XCSB also have a free "lite" compiler:
http://www.xcprod.com/titan/XCSB/CONTRIB/index.html

I started writing the framework of a simple multiplexed bargraph display in HiTech C for you at lunch time, will try to finish it off this week. It should give you an idea of how simple (or complex depending on your point of view) this project could be.

View User's Profile View All Posts By User U2U Member
MikeRJ

posted on 20/3/06 at 11:08 PM Reply With Quote
quote:
Originally posted by paulf
Apparently the pic software is MPLAB some references to it in docs with programmer but need to find a download for it.
Paul.


MPLAB is the free Integrated Development Environment (IDE) for PIC's supplied by Microchip. It has a syntax colouring editor, the MPASM assembler, and the MPSIM simulator built in along with support for the various Microchip development tools. Many third party compilers will also integrate with varying degrees of success...

It's a bit of a monster download though:

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002

(7.31 is the latest version at time of posting)

View User's Profile View All Posts By User U2U Member
<<  1    2  >>
New Topic New Poll New Reply


go to top






Website design and SEO by Studio Montage

All content © 2001-16 LocostBuilders. Reproduction prohibited
Opinions expressed in public posts are those of the author and do not necessarily represent
the views of other users or any member of the LocostBuilders team.
Running XMB 1.8 Partagium [© 2002 XMB Group] on Apache under CentOS Linux
Founded, built and operated by ChrisW.