Hi Leute, ich hab mein Brückenprogramm soweit fertig..das problem:

Ich will von der seriellen einen wert von -1024 bis 1024 empfangen..
Ich kann den motor auch schon steuern, aber das proggi greift anscheinend immer nur ein ASCII-zeichen auf.. zb. wenn ich versuche 900 zu senden, nimmt er die 9, welches ASCII 57 ist...ich will aber die 900 haben, was kann ich ändern?

Hier mal das Proggi

Code:
$regfile = "m8def.dat"
$crystal = 16000000
$baud = 19200


Dim S As Integer
Dim S1 As Integer
Dim I As Integer
Dim J As Integer


Config Pinb.1 = Output
Config Pinb.2 = Output

Config Pind.5 = Output
Config Pind.6 = Output
Config Pind.7 = Output

Config Timer1 = Pwm , Pwm = 10 , Compare A Pwm = Clear Down , Compare B Pwm = Clear Down , Prescale = 8

Portd.6 = 1
Portd.7 = 1

On Urxc Onrxd
Enable Urxc
Enable Interrupts

I = 0

Do
print "Speed=" ; S
Loop

Onrxd:
S = Udr

Return

End
Bitte helft mir, is echt wichtig, die RL steht ja bald an


Gruss Stefan