Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

**UPDATE/CHANGED**[USART]**Reading analogue value of A/D convertor with PIC 16F877A!

Status
Not open for further replies.
When ever I have used a USB to Serial converter I just leave CTS and RTS unconnected and set handshaking to none. What voltage is on pin 2?

Mike.
 
bananasiong said:
Is there any possibility that the data get inverted and causes the UART not to work properly?

Is it at all possible bananasiong? Can I fix it or check it some how?

Thanks.

Vili

PS: Mike, bananasiong- Sorry if I get annoying by asking this!
 
Last edited:
Can you check wether the signal is sent out from the FTDI module or not. If yes maybe you can try inverting it before going into the PIC. I haven't used that before, all the while I'm doing PIC to PIC communication.
 
vili.chaudhary said:
Thanks for mentioning that Mike. The voltage on RA0 pin is .2 V [I apologise if this is not what you have asked].

I should have been more accurate in my question, I meant pin 2 of the USB module. As the communication is only working one way I suspect that the module is outputting 3V instead of 5V.

Bananasoing,
Looking at the data sheet it appears that the modules output can be connected straight to the pic and so any required level shifting and inversion is already taken care of.

Mike.
 
Yup, I see that the output can also be inverted in software if necessary. Maybe you're right about the 3 V.
 
Dear Mike & bananasiong,

I have noticed a very weird thing on pin no. 2 [of USB module].

Using just the TX code:

The TX code works fine with the USB module and the voltage on pin 2 remains on (-) ive 0.02V

Using TX and RX code together:

The voltage on pin2 still remains on -.02V but as soon as I change the COM port in TERMINAL for the serial cable, the voltage gets to 5 V.

Thus serial cable works on COM1 [in TERMINAL] and the voltage gets 5V and when I use COM3 [for USB] the voltage drops to -.02V

Is this what causing the problem?

Many many thanks.

Vili

PS: COM2 & COM4 don't support the USB module!
 
Last edited:
Hi Vili,

I got confused when I read the data sheet and thought pin 2 was VIO. This is actually pin 4 and should be at 5V. If it isn't check that J1 is on pins 2&3 and J2 is on 1&2.

Mike.
 
Dear Mikeeeee....:D

It finally worked!!!!:)

The problem was with the ICD2 connection. After downloading the program onto the PIC as soon as I removed the connection, it worked. All this time it was working but it was just the matter of removing a connection :eek: .

Thank you so so much Mike for all your help and valuable advice. I truly appreciate it.

I have finished my integration part successfully and I dedicate this project to you. Thank you once again Mike.

Vili
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top