Jan Wagemakers schreef:

> I have applied the "chip definition for the PIC12F635"-patch by Alexander
> Zangerl, but that patch doesn't seem to work for me.
> 
> This is what I get:
> 
>  |  pts/5  jan ~/picprog.12f635/picprog-1.8.3$ ./picprog --pic /dev/ttyS1 
> --output /tmp/pic1.hex
>  | Picprog version 1.8.3, Copyright © 2006 Jaakko Hyvätti <[EMAIL PROTECTED]>
>  | Picprog comes with ABSOLUTELY NO WARRANTY; for details
>  | type `picprog --warranty'.  This is free software,
>  | and you are welcome to redistribute it under certain conditions;
>  | type `picprog --copying' for details.
>  | 
>  | /dev/ttyS1:PIC programmer missing or chip fault
>  | /dev/ttyS1:2006:unable to read pic device id
>  |  pts/5  jan ~/picprog.12f635/picprog-1.8.3$
> 
> So, autodetecting the chip fails.

Ok, I have managed to get auto-detection to work.

In picport.cc at line 485 I have uncomment the following:

    // Start and stop bits must be 1.

    // if (!tmp1 || !tmp2) {
    //  cerr << portname << ": PIC programmer missing or chip fault" << endl;
    //  return -1;
    // }

And this is what I get when I run picprog now:

 |  pts/3  jan ~/picprog.12f635/picprog-1.8.3$ ./picprog --pic /dev/ttyS1 
--ihx32 --output /tmp/pic1.hex
 | Picprog version 1.8.3, Copyright © 2006 Jaakko Hyvätti <[EMAIL PROTECTED]>
 | Picprog comes with ABSOLUTELY NO WARRANTY; for details
 | type `picprog --warranty'.  This is free software,
 | and you are welcome to redistribute it under certain conditions;
 | type `picprog --copying' for details.
 | 
 | /dev/ttyS1: id 0x0fa4: detected pic12f635 version 0x04
 | Device pic12f635, program memory: 1024, data memory: 128.
 | Reading program memory,
 | reading data memory,
 | reading id words,
 | reading fuses,
 | done.

Seems to work. 

When I compare this with piklab-prog¹ the differences in the hex-file are
not very big, so I guess that reading is working more or less ;-)

 |  pts/3  jan ~/picprog.12f635/picprog-1.8.3$ piklab-prog -d 12F635 -p direct 
-c read /tmp/pic2.hex
 | Piklab version: 0.12.2 (rev. distribution)
 | programmer: direct
 | device: 12F635
 | Using port from configuration file.
 | Connecting Direct Programmer on Serial Port (/dev/ttyS1) with device 
12F635...
 |  Set target self powered: false
 | Connected
 | Read id: 12F635 (rev. 4)
 | Reading device memory...
 |  Read memory: Configuration Bits
 |  Read memory: User IDs
 |  Read memory: Calibration
 |  Read memory: Code memory
 |  Read memory: Data EEPROM
 | Reading done
 |  pts/3  jan ~/picprog.12f635/picprog-1.8.3$ diff /tmp/pic1.hex /tmp/pic2.hex
 | 130,131c130
 | < :08400000FF3FFF3FFF3FFF3FC0
 | < :02400E00FF3F72
 | ---
 | > :020000040000FA
 | 147a147,152
 | > :020000040000FA
 | > :02400E00FF3F72
 | > :020000040000FA
 | > :08400000FF3FFF3FFF3FFF3FC0
 | > :020000040000FA
 | > :044010007622F43FE1

I'll try to do some more testings the coming days.


[¹] <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=387703>
-- 
Met vriendelijke groetjes         - Jan Wagemakers -

... movl $1, %eax  ;  movl $0, %ebx  ;  int $0x80


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to