
 scenix2.cc

 For use with the jpb programmer or the 2nd Steele programmer schematic

 orig code by Dan Steele

 April 1999 - Dave2

            - corrected method of writing fusex by preserving 5 highorder bits
              both in the erase and program modes. This significantly improves the
              reliability of the programmer.
 
 April 1999 - modified by Allan Meyer
 
            - default (without parameter specified) now gives help screen, not erase
            - removed case sensitivity on command-line parameters
            - added /E parameter for erase
            - added support for multiple parallel ports using env variable SXLPT
            - added port detect and separated error messages specific to port or programmer
            - changed dump parameter from /T to /D
            - changed dump routine to intel hex format
            - added parameter /T for Hardware Test mode
            - added parameters /V and /S for verify
            - added /Z parameter for compliance with 10 msec programming time (newer chips)
            


Important Notes
===============

   - Correction to programming the fusex  

     The original program, scenix.exe, handled the fusex bits incorrectly allowing the 
     factory-set timing bits to be modified.  This version first checks the fusex settings
     and preserves the 5 high-order bits when the fusex is written both when erasing and
     programming the chip.  If you used scenix.exe previously, see correcting the fusex below.
     Dave2's keen eye for detail spotted this right away and quickly came up with 
     the solution.  Note that this version of the program may not be compatible with Rev 5 
     of the scenix chip.


   - Parameter Changes

     /T - The old parameter /T, originally used to produce a dump output is now used
     to execute a test of the output lines using the led's on the jpb programmer.
     If you have this parameter specified in any of your batch files, you should
     change the /T to /D now, before using scenix2.exe.  Although I have repeatedly
     used the new /T option with the chip installed, be aware that it will now
     toggle voltages on the programmer to illuminate the led's one by one, including
     the 12 volt programming voltage to the OSC on the chip.


   - New Parameters

     Most of the newer parameters are self-explanatory.  One note about the new option
     /Z - The spec on the scenix chip originally called for 10 msec /word programming
     time but was changed in the errata to 100 msec.  This was to be fixed on later
     version chips and so I included this option to force the programmer to use the
     original spec of 10 msec if you have the newer chip.  




Correcting the Fusex
====================
The top 5 bits of the fusex store information concerning the number of pins on the chip
and settings to establish the internal oscillator.  Since the internal oscillator is
used when programming the chip in serial mode, changing these bits can significantly affect
the reliability of the programmer.  To restore the bits to the factory setting, you can
use the original program, scenix.exe to manually override the fusex setting with the /X
option.  If the top 5 bits of the fusex are not set to the factory trim setting, the
chip may act in an unpredictable manner when you try to program it.



Do this for any and all chips that have been previously programmed using scenix.exe


          
Additional Notes
================

If you built the jpb programmer (with the led's) you have noticed by now that the 
silkscreen for the led's are backwards.  I apologize for this error.  It will be
corrected in the next release.

If you missed the posts concerning some chips suddenly drawing excess current and burning,
note that adding a 100 ohm resistor between the Osc pin and it's 12 volt source will
help to prevent this from happening.  I also suspect that these chips that burned may
have had altered trim bits.


New Help Output
===============

Usage: scenix filename.sxh [/D][/E][/H][/S][/T][/V][/Z][/?][/Fxxx][/Xxxx]

         /Fxxx - Fuse Word (must be hex and 3 digits long)
         /Xxxx - FuseX Word (must be hex and 3 digits long)

         /D - Dump contents of chip     
         /E - Erase chip                
         /H or /? - Display this screen 
         /S - Show me the Verify        
         /T - Test hardware WITHOUT CHIP
         /V - Verify chip with file     
         /Z - Use 10msec Program Time   

         Default is LPT1 (0x378)        
         To change this create an env   
         variable named SXLPT           
                                        
         At the dos prompt type:        
         Set SXLPT=1 for adr=0x378      
         Set SXLPT=2 for adr=0x278      
         Set SXLPT=3 for adr=0x3BC      




