PDA

View Full Version : timer question


going_bananas
08-05-05, 09:06 PM
hi...

ive been having a rough time implementing a particular code..
it looks something like this

DECIMAL

: S1
CODE TO DETERMINE THE PWM...
;
:S2
CODE TO DETERMINE THE PWM...
;
:S3
CODE TO DETERMINE THE PWM
;
: S4
CODE TO DETERMINE THE PWM
;
....etc...
i have defined a few sensors to determine a frequency

here's the part i'm having problems i want the data that comes from the code to be listed in a column
i.e.

x x x x
x x x x
x x x x
. . . .
. . . .
n n n n

i've been trying something like this..

: MAIN
BEGIN
CR
S1 .
S2 .
S3 .
S4 .
UNTIL
?TERMINAL
;

obviously it wrong and i imagine is something that's really easy..
thanks

nmitech
08-08-05, 10:27 AM
How's about U.R ( u +n --- ) Displays the value of u right justified in a field +n characters wide according to the value of BASE.

The example below display 6 characters right justified.

: MAIN
BEGIN
CR
S1 6 U.R
S2 6 U.R
S3 6 U.R
S4 6 U.R
UNTIL
?TERMINAL
;