Sending 0x8 on uart

Hi,

Its regarding the vnding machine protocol, the protocol says the master has to send a Reset signal 08H to the peripheral via uart. I am very confused on what to send it on the uart, do i need to send ascii equivalent of 0x8 i.e '0' first ' & then next byte '8'.

pseudocode
while(txempty)
*thr = 0x30; //'0'

while(txempty)
*thr = 0x38; //'8';

Does the peripheral get 0x8 at its receiver.Please guide.

StHwk

do i need to send ascii equivalent of 0x8 i.e '0' first ' & then next byte '8'.

No use:-

Serial.write(0x08);

I would like to know Internally how is serial.write writing on the bus ( I don't hv the src code). So does it send in ASCII format as I mentioned earlier

I would like to know Internally how is serial.write writing on the bus

It is not a bus it is the serial output line.

It is writing the value 0x08 in asynchronous serial data format.

You asked the question:-

the protocol says the master has to send a Reset signal 08H to the peripheral via uart

and I showed you how to do it.

Serial.write(0x08);
The process
from D1 -- start_bit, 0, 0, 0, 0, 0, 0, 0, 1, stop_bit

The process
from D1 -- start_bit, 0, 0, 0, 0, 0, 0, 0, 1, stop_bit

don't you mean:-
The process
from D1 -- start_bit, 0, 0, 0, 0, 1, 0, 0, 0, stop_bit

I think we both stand correcting.

0x08 = B00001000, and it's LSB lsb first
Therefor: start, 0, 0, 0, 1, 0, 0, 0, 0, stop

Yep I often get that mixed up, it is about being dyslexic you know.