cancel
Showing results for 
Search instead for 
Did you mean: 

LEARN ST7

dongnguyen39
Associate II
Posted on June 07, 2007 at 06:02

LEARN ST7

2 REPLIES 2
dongnguyen39
Associate II
Posted on May 24, 2007 at 05:08

Dear

:) I want to make toggle led with st7flite. please help me.

thank you

Posted on June 07, 2007 at 06:02

There are various ways to toggle a LED via an I/O. The most simple and basic is to toggle an I/O:

Ex. with LED connected on pin PB0, code in assembler language:

.loop_toggle

ld A, PBDR

xor A, #$01

ld PBDR, A ; PB0 state changes, PB0 toggles.

jra loop_toggle ; jump back to loop_toggle label

Depending on your needs (dedicated frequency, LED to toggle on specific events), another solution is to use a timer and its alternate functions.

Hope it answers your question.

[ This message was edited by: Pedro on 07-06-2007 09:33 ]