Controlling LEDs on FX2LP board

Question: How to light LED's on the FX2LP board from the code to have software test points?

 

Answer:

A portion of the GAL (U2) decodes 8051 reads to certain external memory addresses to turn the four general-purpose indicators D2-D5 on and off. The following table shows the external 8051 addresses which are read to turn them on and off. Note that the four jumpers above the LEDS must be installed to use this feature. These jumpers connect the LEDS to four GAL outputs.

 

 

 

             
   

     Indicator

  
                                                                                             
   

    

  
   

     Turn ON by reading

  
   

     Turn OFF by reading

  
   

     D2

  
   

     0x88--

  
   

     0x80--

  
   

     D3

  
   

     0x98--

  
   

     0x90--

  
   

     D4

  
   

     0xA8--

  
   

     0xA0--

  
   

     D5

  
   

     0xB8--

  
   

     0xB0--

  

 

 

The low address byte is “don’t care”. By this means one can very efficiently add software test points.