winterhunter said:
1) I use PWM at 38 kHz to control the A/C. I multiplex the CCP output using a 74HC00 to be able to selectively control one, the other or both A/Cs. This goes to a 7 m cable that feeds both power and signal (+5V,GND, PWM output) to an NPN transistor controlling an IR LED. However, the A/Cs don't recognize the IR commands (they do when I don't use the cable).
Is there a simple fix for this?
I think the problem could be that the capacitance of the cable is filtering out the 38kHz PWM signal.
Instead of putting the transistor at the LED end of the cable, put it at the74HC00 end of the cable and just use two wires (twin-twisted) to connect the transistor to the LED.
I think you will find that the current drive to the LED will work better than the voltage drive to the transistor.
winterhunter said:
2) In the final configuration, I will be placing the PIC around 10 m away (make that 15 m of cable) from the computer. I've read somewhere that this is pretty much the limit for RS-232,
Depends a lot on the data rate.
If you are using a high speed, 19200 bps or more, then yes you could have a problem.
But if the comms link is run a a slow speed, RS232 will be fine.
How fast does the link have to be, I guess not very fast.
Try 300 bps, it will probably work well.
winterhunter said:
and was thinking of using RS-432. On the µcontroller side, the PIC won't even notice if I replace the MAX232 for a MAX488. However, can I use a MAX488, suitably connected to the computer serial port to "translate" back to RS-232?
Thanks a lot!
Yes you could use two MAX488s to create an RS422 link.
But be aware that the MAX488 does not directly interface to RS232 on its "single ended side", you would probably have to use a MAX232 to get the correct voltage levels for RS232.
Lots of hardware when a slow RS232 link will probably do it all for free!
JimB