Jeff, you raise good points but I would prefer to be safe than sorry, designing/building and coding for the MAX232 or other serial driver will ensure compatibility (as far as RS-232 is able to be compatible) with the widest range of PCs and prevent anything 'unpleasant' happening if the device is plugged into an unknown machine. As heretical as it would seem I'd have to admit you may have a point about Arduino, it's a known hardware platform that is proven to work. Similarly, I've been exploring options with STM32 Blue Pill boards recently but I still like and write code for PIC devices, as and when I need extra horsepower I may well leave the PIC Path and move to ARM, they're *so* cheap and have an abundance of facilities. On 14 November 2017 at 14:54, Byron Jeff wrote: > Tony, > > There are actually two types of FTDI serial ports. There is the RS232 one > with a DB9 connector on the end. Typically that port will signal between > +/- 7 volts or so. Then there are the small FTDI TTL serial adapters. > Depending on configuration they will swing either between 0 and 5 volts o= r > 0 and 3.3 volts. > > In today's serial PC world rarely does an actual MAX232 need to be used f= or > level translation. Even with actual RS232 ports, virtually all of them > signal properly with a 0/5V TTL signal. Note that the sign is inverted su= ch > that a logical 1 is represented by 0V and a zero by 5V. > > For years I've used a simple voltage clamp to limit the swings. The basic > circuit is here: https://i.stack.imgur.com/jyZvD.gif D1 conducts when Vin > is above VMax and D2 conducts then Vin is below Vmin. R limits the curren= t. > I typically put a second resistor after the clamp. I find that 1K for bot= h > works well with PIC inputs. > > A couple of variations are helpful. If D1 and D2 are Schotty diodes then > the voltage overshoot is typically only 0.3V or so. Also if D2 is a Zener > then D1 is unnecessary because the Zener action will limit the high volta= ge > while normal conduction clamps the low voltage. > > With the signal inverted there are a few things you can do to manage it. > I've been using PIC24FV parts for several years. The hardware EUARTS on > them can be inverted in software. It is also possible to bit bang a digit= al > input/output for serial. Otherwise a NPN transistor whose base is connect= ed > to Vout, emitter grounded, and a pullup collector will invert the signal = in > hardware. > > Another thought that may be traitorous on this board: ever considered an > Arduino? Complete boards with the USB serial adapter on board clock in at > about $5 USD. Boards like a Nano will plug right into a breadboard. Plug = in > a USB cable, load the Arduino IDE and you're going literally in about 5 > minutes. Tons of libraries already built into the platform. > > As I've progressed in the hobby, I find that sometimes it's just more > trouble than it's worth to try to roll everything from scratch. Back in t= he > PIC 16C54 days, the price and functionality was a compelling reason to > switch as compared to the alternatives. But in 2017 with high level board= s > such as a Raspberry PI Zero W that runs Linux and having a complete > wireles setup > for less than $10 USD and Arduino clones literally running 5 for $20, it > becomes more difficult to justify wiring up a board from scratch and > programming in assembly anymore. Those who have never done it may need th= e > experience. But those of us who have a closetfull of t-shirts with > 'Assembly coder' emblazoned upon them? Not so much. I find now that I spe= nd > more time and energy trying to match the hardware/firmware to the > application. It literally may be more adventageous to throw a RasPi ZeroW > into a problem to make a wireless remote light switch than any alternativ= e > for > example. > > BAJ > > On Wed, Nov 15, 2017 at 12:54:26AM +1100, Anthony Nixon wrote: > > You wont need a level translator with the FTDI chip. It will directly > > interface to the PIC, and the FTDI directly interfaces to the USB port > > with the right support components which are just a handful of > > passives. > > > > The trick is whether or not the FTDI will be powered by the USB port > > or by the PIC circuit. > > > > cheers > > > > Tony > > > > On Tue, Nov 14, 2017 at 11:56 PM, Richard Pope > wrote: > > > Clint, > > > I'll do that this evening after I get up. I appreciate the insig= ht > > > and help! I will probably have to use a MAX232 to do the level > > > translation. I appreciate you reminding me of that. > > > Thanks, > > > rich! > > > > > > On 11/14/2017 6:47 AM, Clint Jay wrote: > > >> There may be, I've usually just rolled my own routines to service th= e > > >> EUSART though I haven't used the '4520 specifically. > > >> > > >> I don't think there are huge differences between most EUSART > enabled mid > > >> range devices so there should be plenty of example code to examine a= nd > > >> modify for your needs. > > >> > > >> You'll need a level translator if you're going PIC to PC directly. > > >> > > >> On 14 Nov 2017 12:36, "Richard Pope" wrote: > > >> > > >>> Clint, > > >>> Yes, I am using a FTDI to RS232 converter to hook the PC to t= he > > >>> PIC. I just found out that all that I need to do is treat the > connection > > >>> to the PIC as a Serial connection. Is there a MC Serial Library > > >>> available? I'm the one that was confused. > > >>> Thanks, > > >>> rich! > > >>> > > >>> On 11/14/2017 6:28 AM, Clint Jay wrote: > > >>>> I'm a little confused but the way I read your message would sugges= t > that > > >>>> you're going to connect your PIC to the PC with an FTDI USB to > serial > > >>>> device? > > >>>> > > >>>> Or have I misunderstood and you're hoping to connect the PIC to th= e > FTDI > > >>>> with USB? > > >>>> > > >>>> On 14 Nov 2017 12:25, "Richard Pope" > wrote: > > >>>> > > >>>> HELLO ALL, > > >>>> . . . . I could really use some help with using USB on the PIC > 18F4520. > > >>>> I am going to use a FTDI USB to RS232 converter to talk to the PIC > > >>>> 18F4520 Through the RX and TX Pins. I want to send Configuration > Code to > > >>>> a 24C512 serial EPROM. When I add additional devices I want to be > able > > >>>> to update the EPROM. I also want to be able to use a Win 8.1 64bit > Pro > > >>>> PC to control the Programmer. I also do a lot of searching and > research > > >>>> on materials that I acquire from the MicroChip website. I have bee= n > > >>>> reading the MC USB Device Firmware Framework User's Guide. > > >>>> . . . . I have the latest version of MpLab, and the latest > versions of > > >>>> the X8, X18, and X32 Compilers installed. I also see that I need t= o > > >>>> install the latest versions of C30 C and C18 C Compilers and setup > the > > >>>> proper Paths for these files. I don't mind doing the footwork. I a= m > > >>>> Disabled and retired. This gives me a lot of free time. > > >>>> Thanks, > > >>>> > > >>>> Richard R. Pope > > >>>> 1230 19th Street #5 > > >>>> Reedsburg, WI 53959, USA > > >>>> 1-608-768-7448 > > >>>> mechanic_2@charter.net > > >>>> > > >>>> > > >>>> --- > > >>>> This email has been checked for viruses by Avast antivirus softwar= e. > > >>>> https://www.avast.com/antivirus > > >>>> > > >>>> -- > > >>>> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > > >>>> View/change your membership options at > > >>>> http://mailman.mit.edu/mailman/listinfo/piclist > > >>> -- > > >>> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > > >>> View/change your membership options at > > >>> http://mailman.mit.edu/mailman/listinfo/piclist > > >>> > > > > > > -- > > > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > > > View/change your membership options at > > > http://mailman.mit.edu/mailman/listinfo/piclist > > -- > > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > > View/change your membership options at > > http://mailman.mit.edu/mailman/listinfo/piclist > > -- > Byron A. Jeff > Associate Professor: Department of Computer Science and Information > Technology > College of Information and Mathematical Sciences > Clayton State University > http://faculty.clayton.edu/bjeff > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- Clint. *No trees were harmed in the sending of this mail. However, a large number of electrons were greatly inconvenienced.* -- http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .