warum kompliziert, wenns auch einfach geht ...
Mein RGY-Laser reagiert auf folgendes Progrämmchen
einwandfrei:

Code:
$regfile = "m8def.dat"
$crystal = 16000000
$hwstack = 30                                               ' default use 32 for the hardware stack
$swstack = 50                                               ' default use 10 for the SW stack
$framesize = 50
$baud = 250000
Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 2 , Databits = 8

Dim A_byte(16) As Byte

Led Alias Portd.7
Config Led = Output

Uart_tx Alias Portd.1
Config Uart_tx = Output

485_rw Alias Portd.4
Config 485_rw = Output
485_rw = 1

A_byte(1) = 50
A_byte(2) = 130
A_byte(3) = 250
A_byte(4) = 63
A_byte(5) = 63
A_byte(6) = 0
A_byte(7) = 0
A_byte(8) = 255
A_byte(9) = 10
A_byte(10) = 255
A_byte(11) = 128
A_byte(12) = 120



Do

   Ucsrb = Ucsrb And &B11100111 ' UART deaktivieren
   Reset Uart_tx ' break setzen
   Waitus 95
   Set Uart_tx
   Ucsrb = Ucsrb Or &B00011000 ' UART reaktivieren
   Waitus 22
   Printbin A_byte(1) ; 16 ' Daten senden
   Toggle Led
   Waitms 100

Loop