Friday, July 08, 2005

Binary Reflects LED blinks, change blink-velocity

'How can we change the velocity of LED blink with dialing Pot?


COMING SOON


'Set 8LED to portb-line, For X=0 to 250
DEFINE ADC_BITS 10
' Set number of bits in result
DEFINE ADC_CLOCK 3
' Set clock source (3=rc)
DEFINE ADC_SAMPLEUS 50
' Set sampling time in uS
'x, holder name of place

x var byte
trisb = %00000000
pause 500
' start program with a half-second delay
main:
'This line sets a random number between 0 - 255
for x = 0 to 255
portb = x
'send the random number to the ports in b line
pause 250
serout2 PORTC.6, 16468, [DEC x, 13, 10]
' print it to serial out,
' with linefeed and carriage return (10, 13)
next
pause 750
goto main

0 Comments:

Post a Comment

<< Home