Differences

This shows you the differences between two versions of the page.

wiki:projects:python:ezusb:knightrider [2006/06/16 11:50] (current)
Line 1: Line 1:
 +====== knightrider ======
 +a knightrider example...
 +===== firmware =====
 +  * {{:wiki:projects:python:ezusb:iomap.hex.zip|iomap.hex.zip}}
 +
 +===== source =====
 +<code python>
 +#!/usr/bin/python
 +
 +from ezusb import EZUSB
 +
 +ezusb=EZUSB(0x0547,0x2131)
 +ezusb.downloadFW('iomap.hex')
 +
 +import time as time
 +
 +time.sleep(0.1)
 +
 +while 1:
 +  cValue=1
 +  while cValue<256:
 +    time.sleep(0.5)
 +    ezusb.writeRAM(0x1b40,cValue)
 +    cValue=cValue<<1
 +
 +  cValue=128
 +  while cValue>0:
 +    time.sleep(0.5)
 +    ezusb.writeRAM(0x1b40,cValue)
 +    cValue=cValue>>1
 +</code>
 
wiki/projects/python/ezusb/knightrider.txt · Last modified: 2006/06/16 11:50 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki