Test and Measurement Forum

TC-08 Serial Levels

Post any questions about our serial port products

TC-08 Serial Levels

Postby cnelso480 » Sun Nov 09, 2003 10:55 pm

Typically RS-232 Rx and Tx lines indicate an ON state with levels from +3 to +15 Volts. Will the TC-08 respond to ON signals below +7 Volts?
cnelso480
 

Postby markspencer » Mon Nov 10, 2003 8:16 am

Hi,

The TC-08 will respond to signal less then 7volts.

However, the RX ad TX will usually have the same voltage range as RTS and DTR, the unit will require ±7 volts or greater to power the unit. If the serial port is not giving this kind of voltage then the unit will not initialise.

The TC-08 could be powered externally, if required, and then the RX and TX can be below the 7 volts and signals still responded to.

Best regards,
Regards,

Mark Spencer
User avatar
markspencer
Site Admin
Site Admin
 
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Postby cnelso480 » Mon Nov 10, 2003 2:03 pm

I am having difficulties getting consistent responses from the TC-08. My serial levels are +/-5V. My understanding is that I need to get the version number first. Therefore I have been attempting to receive the version number with inconsistent results.


Steps for getting the version number:
1. Turn the TC-08 ON and leave it ON between and during all serial
comm tests. (DTR = -12V and RTS = 12V)
2. Send control byte 0x01 to the TC-08.
3. Wait for and store three byte response.
4. Print three-byte response

My problem is that when I send a single control byte, I never receive a response from the TC-08 (The code for this method is attached). If on the other hand I place the putchar() command in an infinite loop so that it is constantly being sent to the TC-08 I can see an infinite number of three byte responses on an oscilloscope. Since the code was in an infinite loop I couldn't test the getchar() command. That said there were two instances in which I received a response from the TC-08 via the Motorola 68HC11. During each instance, I sent the control byte twice before running getchar(), but this method yielded inconsistent results since I received the response only twice out of five identical runs. Also tried was placing the putchar() command in a finite loop, and then waiting for the response. This also failed.


//1. Ensure that the Temperature Sensor has been ON for more
//than 1 second.
delayGenerator( 300, 0 ); //300*32.768*10^-3 = 9.8 Second delay

//2. Send Version Number Control byte
putchar( (char) 0x01 );

//3. Wait for and store 3 Byte Version Number response
for( j = 0; j < 3; j++ )
{ received[j] = getchar(); }

//4. Print 3 Byte Version Number to LCD
printCharArray( received );[/code][/code]
cnelso480
 

Postby markspencer » Tue Nov 11, 2003 10:07 am

Hi,

The ±5 volts that you are using for RX sholud be fine, this will go straight to the microcontrollers pin. With these any voltage over 3.5 volts is usually treated as high and low would be treated as 0 volts. The TC-08 runs at 9600 Baudrate, check that you are broadcasting the bits at this rate. This may effect the TC-08's response.

Unfortunately, I am unable to comment further in this matter.

Best regards,
Regards,

Mark Spencer
User avatar
markspencer
Site Admin
Site Admin
 
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Postby cnelso480 » Tue Nov 11, 2003 12:15 pm

Mark,

I appreciate your rapid responses.

I am operating at 9600 Baud, and the C code I posted above runs when I open a serial terminal and connect the HC11 to the PC. What are the steps required to initialize the TC-08? It is important that a connection be established between the HC11 and the TC-08 for my project to succeed. Who can I contact that can comment further with regards to serial comm with the TC-08?

Thanks.
cnelso480
 

Postby markspencer » Wed Nov 12, 2003 10:44 am

Hi,

The TC-08 is powered by the RTS and DTR lines in the serial port. You could try first of all setting both to disabled, and then enable the RTS, this is all that is required to initialise the TC-08.

Have you tested the Transmit from your microcontroller, with an ocsilloscope and checked the transmit back from the TC-08. You could also check the voltage is being set correctly, by testing the TC-08 while you are trying to initialise the TC-08.

Best regards,
Mark S.
Regards,

Mark Spencer
User avatar
markspencer
Site Admin
Site Admin
 
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Postby cnelso480 » Wed Nov 12, 2003 2:25 pm

Mark,

I have tried disabling and then enabling RTS, but without any results. The code I am using is the same as I posted before. I send a single character and don't receive a reply.

I tried all of the things you mentioned with the oscilloscope on Sunday, and I get inconsistent results i.e. If I place the transmit from the microcontroller in an infinite loop then I get multiple responses from the TC-08; but if only one control byte is sent, then a 3 byte response doesn't occur. The serial levels from the microcontroller are +/- 5V.

Thanks
cnelso480
 

Postby markspencer » Thu Nov 13, 2003 8:45 am

Hi,

Unfortunately, I have exhausted the reasons why it will not work. I have asked the development team and they are unable to explain why either.

Try the TC-08 with Picolog on a PC and see if it connects correctly, if it does then you will know there is nothing wrong with the TC-08, your voltages are correct and what you have said everything else to the TC-08 seems OK.

Try connecting to the TC-08 via a PC and repeat it again and get the code working form here, once you have done this transpose the code to the HC11. This way you will know that the TC-08 is working in the way you believe it should be.

Best regards,
Regards,

Mark Spencer
User avatar
markspencer
Site Admin
Site Admin
 
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Postby cnelso480 » Thu Nov 13, 2003 3:59 pm

Mark,

The problems I faced stem from my use of getchar(). Getchar() waits for the '\n' i.e. newline character. This implies that since the TC-08 rarely provides the newline character getchar() would never return a value. Consequently, the problem was an error on my part. I have fixed the code so that it reads the Rx register on the HC11 once the Rx flag is set and then prints it to an LCD screen.

The problem now is that I am only receiving a two byte response from the TC-08.
cnelso480
 

Postby markspencer » Fri Nov 14, 2003 8:34 am

Hi,

I am glad that you have solved the first problem, however the TC-08 definately should be returning three byte. To prove this I again adivse you to use it on a PC and connect directly through the serial port and just write the version number control code and then see how many bytes are returned. This will provide the information with regards to the correct performance of the TC-08.

Best regards,
Regards,

Mark Spencer
User avatar
markspencer
Site Admin
Site Admin
 
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Postby cnelso480 » Fri Nov 14, 2003 5:22 pm

Mark,

Thanks so much for all your help. I discovered that the reason I only received two bytes was a programming error on my part since I was printing the bytes as they were received. I fixed the problem by saving all three bytes and then printing them.

Thanks again.
cnelso480
 


Return to Serial Port Products

Who is online

Users browsing this forum: No registered users and 0 guests