Forum - MCS Electronics
View previous topic :: View next topic
Author
Message
atmega64 Joined: 23 Feb 2005 Posts: 298 Location: ITALY
Posted: Wed Oct 23, 2019 3:53 pm Post subject: Sending byte arrays to the Serial USART
Hi,
the following code in VB.net:
SerialPort1.Write (CommandByte, 0, CommandByte.Length)
sends to the serial the bytes present in the CommandByte array.
in bascom:
Code: Print #1 , Commadbyte( 0 ) , CommandByte.Length
so I send all the bytes of the Commandbyte array starting from the first one, on the Com1 port ... right?
(BASCOM-AVR version : 2.0.8.1 , Latest : 2.0.8.2 )
Back to top
Netzman Joined: 25 Nov 2005 Posts: 127 Location: Graz
Back to top
EDC Joined: 26 Mar 2014 Posts: 971
Posted: Wed Oct 23, 2019 5:02 pm Post subject:
Code: Dim Myarray( 10 ) As Byte , Msg_len As Byte , N As Byte , Helpb As Byte
Msg_len = 5
'this needs latest 2082 Bascom
Printbin Myarray( 1 ) , Msg_len
'or on previous versions
For N = 1 To Msg_len
Helpb = Myarray( n)
Printbin Helpb
Next
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum