I have also tried disconnecting from the serial port completely and linking the output into the input. The second chip receives all the commands from the first chip fine. It seems this is only a problem when sending to a PC
I have also tried disconnecting from the serial port completely and linking the output into the input. The second chip receives all the commands from the first chip fine. It seems this is only a problem when sending to a PC
Well, being that you are using...OH WAIT...What chip are you using?
And what pin... And what about code?
I have lots of solutions to your problem
Who said this:
"That which seems simple is often overlooked" (Usually by me)
![]()
Dave
Always wear safety glasses while programming.
Righty then. The code is perfect (im sure). the chip is a PIC16F84A.
Ive found some settings in the VB comm control and data is now getting in. Its not completely reliable. This circuit is part of the circuit i have other threads about. Im just about to rip the whole thing out of the breadboard and start the whole thing again. I will be testing after almost every new wire to be sure its all done properly.
Ill post back when i start getting more problems (when, not if) lol
The serial output/input on a pic is TTL so you will have perfect communication in this type of setup. However a PC is RS-232 which is a 12V inverted communications signal. Normally you would use a MAX232 or MAX233 transceiver to convert the serial TTL I/O from the pic to RS-232. A lesser expensive option is to use a few transistors, a quick forum or web search should come up with a schematic.The second chip receives all the commands from the first chip fine.
However the "quick and dirty" way is by placing a 22K resistor in series with the TX pin on the PC side to the RX pin on the pic side. You need to also tie the PC serial ports GND to common on the pic side. (see "DEBUGIN" command in the PicBasic Pro manual for a schematic) BTW the Pic won't be able to transmit back to the PC with this method. To do that see the "DEBUG" command in the manual.
I'm not sure that I follow what you mean here, see the above "quick and dirty" way.I have a 100K resistor going from the serial pin to ground (also tried without this).
Hi, thanx for your suggestions. This seems to be working perfect now too. For PC to PIC i have a 33K resistor between the serial port and the chip. For PIC to PC i just have the wire going from the chip into the serial port. Nothing else is connected.
I think my biggest problem was the settings for VB's comm control. I did notice that i got a lot of randomness if i touch the serial wires but that isnt affecting anything at the moment.
For now its all good. Finally! lol
Bookmarks