A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
code rquest........(dont hit me!) - Lez - Oct 31 16:13:37 2006
Ok I'm hitting my head against a wall here............
I have a willem style programmer from sivava.
I have no problems with it with my box of f88's
I have been working on communicating to a phone with them.
I needed more code space and usb so upgraded to 18f2550.
Cant get them to program right.........
I am using the ISP from the sivava to my own board, heres a pic during
the building.
http://homepage.ntlworld.com/tinabriddon/bday/DSC00464.JPG
I did build the ISP wrong, I switch rb6 and rb7, so did a swap in the
cable to correct it.
So, to test the pic, and the board, can someone post some short hex,
not asm / C etc but ready to burn hex, to just flash / run lights on
say port B, nothing fancy shorter the better etc.
I'm sorry to ask for working code in this way, but its a very simple
request, I dont know whats going wrong.
The pic should be fine so I dont know why when it programmed it didnt
work, but it only programs about one good burn in an hour.........
--
Lez
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: code rquest........(dont hit me!) - Malcolm Crabbe - Oct 31 17:37:40 2006
Lez,
I had similar problems with ICSP of these chips. If I placed it in the
sockets of my commercially made JDM programmer it worked fine, using
ISCP it failed every time.
Malcolm
Lez wrote:
>Ok I'm hitting my head against a wall here............
>
>I have a willem style programmer from sivava.
>I have no problems with it with my box of f88's
>
>I have been working on communicating to a phone with them.
>
>I needed more code space and usb so upgraded to 18f2550.
>
>Cant get them to program right.........
>
>I am using the ISP from the sivava to my own board, heres a pic during
>the building.
>
>http://homepage.ntlworld.com/tinabriddon/bday/DSC00464.JPG
>
>I did build the ISP wrong, I switch rb6 and rb7, so did a swap in the
>cable to correct it.
>So, to test the pic, and the board, can someone post some short hex,
>not asm / C etc but ready to burn hex, to just flash / run lights on
>say port B, nothing fancy shorter the better etc.
>
>I'm sorry to ask for working code in this way, but its a very simple
>request, I dont know whats going wrong.
>
>The pic should be fine so I dont know why when it programmed it didnt
>work, but it only programs about one good burn in an hour.........
>
>
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: code rquest........(dont hit me!) - Eirik Karlsen - Oct 31 20:04:51 2006
Lez,
attached is a skeleton I'm working on right now for a new program.
its for a F242 so change the proc type at the top, and remove the
mathlib reference. Other than that it should run ok.
It flashes a LED at RB0, running at 1Mhz RC osc.
The file MAY be dropped by Yahoo....
Lez wrote:
> Ok I'm hitting my head against a wall here............
>
> I have a willem style programmer from sivava.
>
> I have no problems with it with my box of f88's
>
> I have been working on communicating to a phone with them.
>
> I needed more code space and usb so upgraded to 18f2550.
>
> Cant get them to program right.........
>
> I am using the ISP from the sivava to my own board, heres a pic during
>
> the building.
>
> http://homepage.ntlworld.com/tinabriddon/bday/DSC00464.JPG
>
> I did build the ISP wrong, I switch rb6 and rb7, so did a swap in the
> cable to correct it.
>
> So, to test the pic, and the board, can someone post some short hex,
> not asm / C etc but ready to burn hex, to just flash / run lights on
> say port B, nothing fancy shorter the better etc.
>
> I'm sorry to ask for working code in this way, but its a very simple
> request, I dont know whats going wrong.
>
> The pic should be fine so I dont know why when it programmed it didnt
> work, but it only programs about one good burn in an hour.........
>
> --
>
> Lez
>
--
*******************************************
VISIT MY HOME PAGE:
LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: code rquest........(dont hit me!) - Lez - Nov 1 3:54:40 2006
Thanks, I'm beginning to wish I'd picked something other than the 2550....
On 31/10/06, Eirik Karlsen
wrote:
>
> Lez,
> attached is a skeleton I'm working on right now for a new program.
> its for a F242 so change the proc type at the top, and remove the mathlib
> reference. Other than that it should run ok.
> It flashes a LED at RB0, running at 1Mhz RC osc.
>
> The file MAY be dropped by Yahoo....
> Lez wrote:
>
> Ok I'm hitting my head against a wall here............
>
> I have a willem style programmer from sivava.
>
> I have no problems with it with my box of f88's
>
> I have been working on communicating to a phone with them.
>
> I needed more code space and usb so upgraded to 18f2550.
>
> Cant get them to program right.........
>
> I am using the ISP from the sivava to my own board, heres a pic during
> the building.
>
> http://homepage.ntlworld.com/tinabriddon/bday/DSC00464.JPG
>
> I did build the ISP wrong, I switch rb6 and rb7, so did a swap in the
> cable to correct it.
>
> So, to test the pic, and the board, can someone post some short hex,
> not asm / C etc but ready to burn hex, to just flash / run lights on
> say port B, nothing fancy shorter the better etc.
>
> I'm sorry to ask for working code in this way, but its a very simple
> request, I dont know whats going wrong.
>
> The pic should be fine so I dont know why when it programmed it didnt
> work, but it only programs about one good burn in an hour.........
>
> --
>
> Lez
>
> --
> *******************************************
> VISIT MY HOME PAGE:
>
>
LAST UPDATED: 23/08/2003
> *******************************************
> Regards
> Eirik Karlsen
>
--
Lez

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: code rquest........(dont hit me!) - Lez - Nov 1 4:04:34 2006
On 31/10/06, Malcolm Crabbe
wrote:
> Lez,
>
> I had similar problems with ICSP of these chips. If I placed it in the
> sockets of my commercially made JDM programmer it worked fine, using
> ISCP it failed every time.
>
> Malcolm
Ha ha, so it may be that, oh joy.............
I'm on a willem based programmer from sivava so far its been stable,
but even with a f88 actually in it every now and again it would fail
and I would have to change LVP and try again, cant see why that should
have helped as sometimes it worked with it set, others with it not
set........... Did I say stable....
Lez
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: code rquest........(dont hit me!) - Malcolm Crabbe - Nov 1 5:06:44 2006
Lez,
I have no idea why it wouldn't work in ICSP mode. I tried three
programs ( WinPIC, ICPROG and PICPGM), I tried short leads from the
programmer to the chip, and obviously tried several chips - the result
was always the same.
I'm guessing that as some of the other pins on the PIC are grounded or
kept high, that this has something to do with allowing the pic to enter
programming mode - shouldn't do in theory, but that was the only
plausible idea I came up with. ( I had tried all options to apply
voltage to vPP before vdd etc and that had no effect)
Sorry can't help further
Malcolm
Lez wrote:
>On 31/10/06, Malcolm Crabbe
wrote:
>
>
>>Lez,
>>
>> I had similar problems with ICSP of these chips. If I placed it in the
>> sockets of my commercially made JDM programmer it worked fine, using
>> ISCP it failed every time.
>>
>> Malcolm
>>
>>Ha ha, so it may be that, oh joy.............
>
>I'm on a willem based programmer from sivava so far its been stable,
>but even with a f88 actually in it every now and again it would fail
>and I would have to change LVP and try again, cant see why that should
>have helped as sometimes it worked with it set, others with it not
>set........... Did I say stable....
>
>Lez
>
>
>
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: code rquest........(dont hit me!) - Lez - Nov 1 5:31:28 2006
WellI'm about to unsolder the damn thing, stick a few bits of wire on it and
push them into the socket I use for the f88, if that works, I'll move the
wires to the IP connector, maybe the programmer boards IP is faulty......
z

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: code rquest........(dont hit me!) - Lez - Nov 1 7:35:20 2006
On 01/11/06, Lez
wrote:
> WellI'm about to unsolder the damn thing, stick a few bits of wire on it and
> push them into the socket I use for the f88, if that works, I'll move the
> wires to the IP connector, maybe the programmer boards IP is faulty......
>
> z
Guess what, still cant get it to work!
I've soldered wires on it and stuck them in the 18 pin socket, no use,
I have soldered them to the ISP connector, no use.
I tried this with a f88, worked, I soldered wires to a 877,
problematic but worked........
I think I'll just go on the web/ebay and see if I can buy a boot
loader programmed 2550 and dump this damn programmer..........
--
Lez
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: code rquest........(dont hit me!) - Lez - Nov 1 8:34:19 2006
ucces !
hey my caps s has gone, damn keyboard hates me now!
Ok it was the POS software from sivava, tried winpic800, set it to
willem, programmed and verified on the first go.
tried original software, would not even read it back correctly, back
to winpic, 5 for 5 programs and verifys (with a 2550 soldered to isp)
plugged my project/proto board back in, nothing, found out I must not
have anything connect to rb7 when programming, it had a 2k resistor
and an led, same as all the rb's, can leave the one on rb6, but not
rb7.
I was sent some HEX to flash an led on ra0, and I have the code in,
but nothing flashes, maybe its fuses or something.
I'm on a 16mhz tin box crystal(just in case someone wants to flash my
led's), so when I have had a cuppa, and watched a film to chill out,
i'll come back top this...........
Lez
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
RE: code rquest........(dont hit me!) - KM6VV - Nov 1 11:38:17 2006
Hi Lez, Malcom,
The clock and data lines need to be only lightly loaded, or provide jumpers
to disconnect circuitry attached to them. The circuit may have to be
powered.
I have an ICD2 both at work and at home which I routinely use. I have a
"universal programming module" for work, and like it. When I came across a
similar (clone) module, I bought it. It wouldn't work at all until I
attached 5v power to it for the PIC (my ICD2 setup expects powered host).
Even after I added a 5V wall wart, and could only get intermittent success
with it. I examined the power, it appeared OK. Then I hung a 50uF (?) cap
on the module, and all my problems went away! Just food for thought.
> Lez,
>
> I have no idea why it wouldn't work in ICSP mode. I tried three
> programs ( WinPIC, ICPROG and PICPGM), I tried short leads from the
> programmer to the chip, and obviously tried several chips - the result
> was always the same.
>
> I'm guessing that as some of the other pins on the PIC are grounded or
> kept high, that this has something to do with allowing the pic to enter
> programming mode - shouldn't do in theory, but that was the only
> plausible idea I came up with. ( I had tried all options to apply
> voltage to vPP before vdd etc and that had no effect)
>
> Sorry can't help further
>
> Malcolm
>
> Lez wrote:
>
> >On 31/10/06, Malcolm Crabbe
wrote:
> >
> >
> >>
> >>
> >>
> >>
> >>Lez,
> >>
> >> I had similar problems with ICSP of these chips. If I placed it in the
> >> sockets of my commercially made JDM programmer it worked fine, using
> >> ISCP it failed every time.
> >>
> >> Malcolm
> >>
> >>
> >
> >
> >
> >Ha ha, so it may be that, oh joy.............
> >
> >I'm on a willem based programmer from sivava so far its been stable,
> >but even with a f88 actually in it every now and again it would fail
> >and I would have to change LVP and try again, cant see why that should
> >have helped as sometimes it worked with it set, others with it not
> >set........... Did I say stable....
> >
> >Lez
> >
> >
> >
> to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructions
>

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: code rquest........(dont hit me!) - Dennis Clark - Nov 1 11:47:44 2006
In general this is the fault of either the programmer or the software
used to run it. It sounds like the algorithm is wrong for the parts. I
got tired of dealing with third party "cheap" programmers and just got a
ICD2 "hocky puck". Yeah, $150, but I've never had an ISP programming
problem again. Microengineering Labs also has a really good one, and
good software and support.
IMO,
DLC
Malcolm Crabbe wrote:
> Lez,
>
> I have no idea why it wouldn't work in ICSP mode. I tried three
> programs ( WinPIC, ICPROG and PICPGM), I tried short leads from the
> programmer to the chip, and obviously tried several chips - the result
> was always the same.
>
> I'm guessing that as some of the other pins on the PIC are grounded or
> kept high, that this has something to do with allowing the pic to enter
> programming mode - shouldn't do in theory, but that was the only
> plausible idea I came up with. ( I had tried all options to apply
> voltage to vPP before vdd etc and that had no effect)
>
> Sorry can't help further
>
> Malcolm
>
> Lez wrote:
>>On 31/10/06, Malcolm Crabbe
wrote:
>>
>>>
>>>
>>>
>>>Lez,
>>>
>>>I had similar problems with ICSP of these chips. If I placed it in the
>>>sockets of my commercially made JDM programmer it worked fine, using
>>>ISCP it failed every time.
>>>
>>>Malcolm
>>>
>>>Ha ha, so it may be that, oh joy.............
>>
>>I'm on a willem based programmer from sivava so far its been stable,
>>but even with a f88 actually in it every now and again it would fail
>>and I would have to change LVP and try again, cant see why that should
>>have helped as sometimes it worked with it set, others with it not
>>set........... Did I say stable....
>>
>>Lez
>> to unsubscribe, go to http://www.yahoogroups.com and follow the instructions
>

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: code rquest........(dont hit me!) - Lez - Nov 1 14:07:13 2006
>. I
> got tired of dealing with third party "cheap" programmers and just got a
> ICD2 "hocky puck". Yeah, $150, but I've never had an ISP programming
>
You do seem to get what you pay for, but I didnt want to do ICD, just
ISP, ICD seems a bit of a step for me I still have not got around to
even trying to use a bootloader or the USB side of things.
ICD would be a great help but does it work real time? cant imagin how
software on a PC connected via a brick to the prototype could keep up
with all whats happening, or am I missing something.
I'm currently build the next thing from 'hello world', an alarm,
simply watches a 'door' switch and flashes an led if triggered and
sends some serial data (96008n1 etc) "help help help"
Would spending the bucks on an ICD setup help in developing something
like this, at the moment its watch it fail, turn it off, fix the code,
compile the code, connect board to ISP, burn, verify, unplug board,
power it back up, watch it fail...........
If it could speed up that cycle, it would be worth it........
Lez
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: code rquest........(dont hit me!) - Eirik Karlsen - Nov 1 15:05:58 2006
Lez,
Personally I don't think you need an ICD just yet...
Although MPLAB SIM is of little or no help in debugging serial stuff it
is still
very useful, and in your case I bet 95% of the code can be simulated in
full. Try it
and cut down on the burning and chip swapping. You'll probably also save
a lot of time.
Right now I'm using a serial bootloader, everything is done by mouse and
keyboard,
the PICSTART was only used to get the bootloader into the chip so now
there is less
mess on the desktop. But its not super fast, download times vary but is
in the order of 30sec's.
I try to use the bootloader whenever I can, even on very small projects,
and if possible I also include
a 'programming' header on the PCB for easy software upgrade should it
ever be necessary.
As I understand it you're fairly new to PIC and MPLAB...at this stage my
advice is to start using
the simulator...in addition to the editor window also place the SFR, FR,
and WATCH windows side-by-side,
set breakpoints, and simulate external data by typing new values for the
appropriate registers in the FR window,
then run or singlestep to see the effect. You'd be surprised how far you
can get with this.
I've done things this way for my largest asm program thus far; 12KB and
3600 lines of asm code. Without the
simulator I probably would have given up early on in the project.
Lez wrote:
> ...............Would spending the bucks on an ICD setup help in
> developing something
> like this, at the moment its watch it fail, turn it off, fix the code,
>
> compile the code, connect board to ISP, burn, verify, unplug board,
> power it back up, watch it fail.....
>
> If it could speed up that cycle, it would be worth it........
>
> Lez
>
--
*******************************************
VISIT MY HOME PAGE:
LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: code rquest........(dont hit me!) - Dennis Clark - Nov 1 15:13:28 2006
I got the ICD just to get the higher performance programmer, the
debugger was a side effect which I use from time to time. Something
like the MChip PICkit line programs ISP a lot of parts but doesn't do
the ICD stuff, for a considerable amount less money.
DLC
Lez wrote:
>>. I
>> got tired of dealing with third party "cheap" programmers and just got a
>> ICD2 "hocky puck". Yeah, $150, but I've never had an ISP programming
>>
> You do seem to get what you pay for, but I didnt want to do ICD, just
> ISP, ICD seems a bit of a step for me I still have not got around to
> even trying to use a bootloader or the USB side of things.
>
> ICD would be a great help but does it work real time? cant imagin how
> software on a PC connected via a brick to the prototype could keep up
> with all whats happening, or am I missing something.
>
> I'm currently build the next thing from 'hello world', an alarm,
> simply watches a 'door' switch and flashes an led if triggered and
> sends some serial data (96008n1 etc) "help help help"
>
> Would spending the bucks on an ICD setup help in developing something
> like this, at the moment its watch it fail, turn it off, fix the code,
> compile the code, connect board to ISP, burn, verify, unplug board,
> power it back up, watch it fail...........
>
> If it could speed up that cycle, it would be worth it........
> Lez
> to unsubscribe, go to http://www.yahoogroups.com and follow the instructions
>

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: code rquest........(dont hit me!) - Dennis Clark - Nov 1 15:21:31 2006
I agree, the simulator is invaluable for serial port work. I have lots
of projects that are in assembly that do serial I/O bit-banged. I could
not have gotten them to work nearly as quickly without the simulator
support. Sims can do a LOT and you can get a lot help tweaking state
machines using the MPLAB simulator.
DLC
Eirik Karlsen wrote:
> Lez,
> Personally I don't think you need an ICD just yet...
> Although MPLAB SIM is of little or no help in debugging serial stuff it
> is still
> very useful, and in your case I bet 95% of the code can be simulated in
> full. Try it
> and cut down on the burning and chip swapping. You'll probably also save
> a lot of time.
>
> Right now I'm using a serial bootloader, everything is done by mouse and
> keyboard,
> the PICSTART was only used to get the bootloader into the chip so now
> there is less
> mess on the desktop. But its not super fast, download times vary but is
> in the order of 30sec's.
>
> I try to use the bootloader whenever I can, even on very small projects,
> and if possible I also include
> a 'programming' header on the PCB for easy software upgrade should it
> ever be necessary.
>
> As I understand it you're fairly new to PIC and MPLAB...at this stage my
> advice is to start using
> the simulator...in addition to the editor window also place the SFR, FR,
> and WATCH windows side-by-side,
> set breakpoints, and simulate external data by typing new values for the
> appropriate registers in the FR window,
> then run or singlestep to see the effect. You'd be surprised how far you
> can get with this.
> I've done things this way for my largest asm program thus far; 12KB and
> 3600 lines of asm code. Without the
> simulator I probably would have given up early on in the project.
>
>
>
>
>
>
> Lez wrote:
>
>> ...............Would spending the bucks on an ICD setup help in
>> developing something
>> like this, at the moment its watch it fail, turn it off, fix the code,
>> compile the code, connect board to ISP, burn, verify, unplug board,
>> power it back up, watch it fail.....
>>
>> If it could speed up that cycle, it would be worth it........
>>
>> Lez
>> --
> *******************************************
> VISIT MY HOME PAGE:
>
> LAST UPDATED: 23/08/2003
> *******************************************
> Regards
> Eirik Karlsen
>
--
---------------------------------------
Dennis Clark TTT Enterprises
---------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: code rquest........(dont hit me!) - Lez - Nov 1 16:53:11 2006
Well I thank you all for your time and comments, I really didnt think this
morning that I was going to get this 2550 working, but its now happily sat
on the bench with all its little leds on the ports counting 0 to 255.
(programmer software was not up to the job, winpic800 worked first time)
I needed to move from the f88 because I decided to build myself a car alarm
atached to a phone, on the f88 I can send the phone a text message, read it
via the phones serial port/modem commands, and pulse a relay, which in turn
can lock/unlock the doors via the central locking. (most cars just need a
line pulled to ground for half a second)
Thankfully I have lots of free text messages! (and its not for use all the
time, just when away from car)
Problem I hit was I wanted more features, and the f88 did not have enough IO
lines.
I managed all that the hard way, program, curse, reprogram, I guess with
some sim software it may have been quicker.
So now I just need to recompile it on the 2550 and switch things to
different ports.
Do you think (since its 2550) I could improve development speed with a usb
bootloader?
How do they 'gel' with mplab etc (using PBP and mplab/mpasm)
Could I leave the usb lead in, so the running circuit could send debuggin
message to the PC, currently I just flash codes on an led, 1 flash waiting
for text message, 2 flashes message recieved, 3 flashes message decoded etc
It gets tedious counting LED flashes ! (I should have an LCD on it by now!)

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: code rquest........(dont hit me!) - Aaron - Nov 1 17:03:12 2006
Malcolm Crabbe wrote:
>Lez,
>
>I have no idea why it wouldn't work in ICSP mode.
>
Check out this link:
http://www.embedinc.com/picprg/icsp.htm
Aaron
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: code rquest........(dont hit me!) - Eirik Karlsen - Nov 1 18:10:59 2006
Lez,
I sometimes set up the USART and use this little routine to find out
what's going on inside the chip:
;********** TXTBYTE DEBUG ROUTINE
****************************************
TXBYTE CALL TXWait ; Ready to TX?
MOVFF WREG,TXREG ; Yes! Transmit data fron WREG
TXWait BTFSS PIR1,TXIF ; TX busy?
BRA TXWait ; Yes!
while byte is
transmitting
RETURN
;*************************************************************************
Just load the WREG with a variable and call this routine and watch the
result
on the PC using a terminal program. I prefer "RS232 Hex Com Tool" from
Simple no nonsense stuff.
Lez wrote:
> .......Could I leave the usb lead in, so the running circuit could
> send debuggin message to the PC, currently I just flash codes on an
> led, 1 flash waiting for text message, 2 flashes message recieved, 3
> flashes message decoded etc
>
> It gets tedious counting LED flashes ! (I should have an LCD on it by
> now!)
--
*******************************************
VISIT MY HOME PAGE:
LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )