This is a multi-part message in MIME format. --_----------=_1213204445313502 Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MessagingEngine.com Webmail Interface Date: Wed, 11 Jun 2008 17:14:05 UT On Wed, 11 Jun 2008 09:53:12 -0700 (PDT), "PicDude" said: > > I need to switch on/off a 12V load, high-side, from a PIC running on 5V, > and > tried this circuit, but the output is always on. With the PIC I/O > floating > (set as input), the load should be switched off, and with the I/O low, > the > load should be switched on. I'm using 1k for R1 and 10K for R2. The > load > will be up to ~250mA, btw. Hi Neil, On old 16C parts you do it with RA4 because the old process could tolerate the voltage. But you'll need to use an extra transistor to level shift. Attached is an example. Cheerful regards, Bob -- http://www.fastmail.fm - The way an email service should be --_----------=_1213204445313502 Content-Disposition: attachment; filename="hiside.gif" Content-Transfer-Encoding: base64 Content-Type: image/gif; name="hiside.gif" MIME-Version: 1.0 X-Mailer: MessagingEngine.com Webmail Interface Date: Wed, 11 Jun 2008 17:14:05 UT R0lGODlh7AHYAfcAAAQCBPz+BAT+/AQC/Pz+/BXjz/USFXcAANjPAFnj8BUS AAAAAAAABACJAABMAAAAAADPAADjAAASAAAAAEQBDBwA5AAAEgAAACLMmBzj 0AASFQAAADYC5AAA5QAAEgAAAFZDAgBYAADUAAB3ALCWjAJT5ADUEgB3AAA4 ogMB7QAC1AAAd5wgreIA7RIA1AAAd1PCdCEB5OcNEncAAAABDAAAAAEAAAAC AAAABQAAABUAAAAAAKSeAOECABIAAAAAAAABKAEAmwAAdgAAAMToAuLxABIS AAAAAAUQBJD3APdFAHcAAMggKtUAAPYAAHcAAP8P9P8AAf8AAP8AAGoANRYA AvUAAHcAAMQABB4AAOcAAHcAAABeKgCAABWWAABxAADN9ACrAQC6AADcAAAA NR4AAhgAAAAAANjEBFnjABUSAAAAAABeFwCAAACWAABxAH7c9ADjAQASAMAA AADxNQBcAgDUAAB3AP84DP8BAP8CAP8AAP8gbP8AW/8A5/8AdwDCIAAB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YC gjgZkPiIQIPkk8ShbP9YUx95jWx1lReTlFNpky1pleWolfRTSFK5i145gTxY jGJpSmTJlWa5lCfJgmsZPsXISKYoV3qlRA0JFHfpV/2Xk2AIOUB5XLMEINH0 lyy5SgzyYYPpYYt4lN+FmDGZjyvlg5KZmGoYhvgXmZeJme/3jjS3l50JmXd1 kFk5moDZV6YZkaj5lKXJTRrYmjz5hyMYm7Lpmq+5mrM5mr81PI3JYtplm7fp maLpgMMJVVW5m8dJmnHGmst5Xv/oc5uXXvz3nFzEPKFpndeZW78pdbVJm0Sp nb7oFUi4KZ5mZWDmWUYI2E7p2VVeFmbtiU3vyYrD+XzUF5+PNZ/4uX2IRJ+3 aZ/3tp9Pp58C6ksEWqDyiXwI6kfrCZ8LahFZgp4PqhGsF3wVynsXinsZSnsb OnsdGnsf+noh2nojqnolinonanopSnorKnotCnrdaXgxOngzCng12nc3qnc5 enc7Snc9Gnc/6nZBunZDinZFanZHOnZJKnZLGnQnSZ4TGqVSOqVUWqVWeqX9 MmxYuqVc2qW893iQAaaPIaZeWqZmuqDfeaZquqZs2qZu+qZwGqdyOqd0Wqd2 eqd4mqd6ahABAQA7 --_----------=_1213204445313502 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --_----------=_1213204445313502--