>>> Ok Dave but how can i do to transfer this program from Mac Osx to cassette?
No idea I am afraid. Perhaps someone else can help with this question.
So, to summarise where we are, we appeared to have a 6502 CPU that didn't work - but then decided to work for no apparent reason; a faulty 6530 (UK3) - replaced by an adapter board; and a 6522 (UM3?) that was installed the wrong way round. Does this coincide with your recollection?
I think there is a high probability now that the IEEE488 port is working - as the drive does something when you command it to from the PET. That is good news.
I am now thinking of some ways to test out the digital logic board to analogue board to disk drive interfaces.
Can you post EXACTLY what digital board you have (there appears to be two variants - Rev G and H) and what analogue board you have (there may be a couple of versions of this also). Also, what make and manufacture of physical disk drives you have.
You should have a digital board in the top of the case connected to the left-hand-side disk drive containing an analogue board and the right-hand-side disk drive should be a 'bare' drive with very little (if any) electronics on it.
Can you also note which plugs and sockets are connected to where. It is easy to get the plugs and sockets accidentally reversed with two drives (I have done it myself - but on a DEC machine not a Commodore). I plugged the head cable into the drive 0 connector and the digital cable into the drive 1 connector. It was never going to work that way round - and it didn't!
You can see an open drive here:
https://www.vintagecomputer.net/commodore/2040/CBM_2040_lid-up.jpg.
EDIT: I have some new tests now I have worked out how the logic board, the analogue board and the disk drives are interconnected. Later on...
Dave