Would a PIC18F67J50 be enough for my project? - Page 1
Forum section: electronics / general

author: pratiken
author_rank: Contributor
timestamp: November 21, 2017, 09:32:41 pm
content: Hi everyone,Just wondering if a PIC18F67J50 would be enough for this or if I should go up to a PIC32.I'm building a small lab device that I'd like to use USB and Ethernet with an ENC28J60. For USB, I'd like to use CDC to simulate a COM port. For Ethernet, I'd like to serve a single webpage over HTTP or Telnet. Telnet and USB would not be used at the same time.These will be controlling 12 small 6 bit IC's via SPI.Here's the PIChttp://www.microchip.com/wwwproducts/en/PIC18F67J50And here is the ENC28J60http://www.microchip.com/wwwproducts/en/enc28j60What do you guys think?Thanks in advance

author: Rasz
author_rank: Super Contributor
timestamp: November 21, 2017, 09:55:34 pm
content: Sounds like something you would do 10 years agoShouldnt be a problem nowadays. You could probably do it today with $2 arduino (stm32duino.com) clone (bluepill) and sample code found on the internet in one weekend.

author: Arjen_Arg
author_rank: Contributor
timestamp: November 22, 2017, 03:48:19 am
content: You should check where you feel more comfortably working. For ethernet on PIC you can use Harmony or MLA. MLA is a discontinued product, but it's a nice set of libraries where it's fairly straightforward to implement ethernet on the PIC18. Harmony wants to be easier, but I personally find it more complicated and harder to use. Harmony doesn't support PIC18. So, IMO, find the TCP stack you are the happiest with and choose the device accordingly.

author: pratiken
author_rank: Contributor
timestamp: November 22, 2017, 04:05:29 am
content: Haha, yeah I know.Slow to get caught upI would totally use an Arduino, but I have some special requirements for this particular project.So, PIC18F67J50 will be fine then? Will I be able to display a JPEG image on the webpage? Or do I need to add flash memory too?Thanks again

author: mrpackethead
author_rank: Super Contributor
timestamp: November 22, 2017, 04:07:41 am
content: Unless you are really cost constrained, go the whole hog and get a PIC32MZ, and use a LAN8740 lan Phy.. You'll have it up and running in a few hours.

author: pratiken
author_rank: Contributor
timestamp: November 22, 2017, 04:42:56 am
content: I was wrestling with that idea.If I went with the PIC32MX795F512H would I be able to display a 30KB webpage (with JPEG images) off the PIC itself? Or would I need to add external flash memory?

author: mrpackethead
author_rank: Super Contributor
timestamp: November 22, 2017, 05:09:38 am
content: In deed you coudl display a 30k ( or larger ) web page. the PIC32MZ2048 will give you 2MB of space if you really want! My web pages are around 120k, images, javascript etc. You can of course display dyanmic content.I'd suggest you start by getting a dev board, and then you can try it out.

author: Rasz
author_rank: Super Contributor
timestamp: November 22, 2017, 06:12:11 am
content: another this decade option is $3 ESP8266 if you can swap ethernet for Wifi.https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/using-the-arduino-addonhttps://github.com/cnlohr/espusbIts pretty amazing that project like this (controlling SPI connected devices over the network using web interface) used to me a huge undertaking requiring careful component selection and vast knowledge over several domains. Today it comes as a sample code for $3 part.

author: pratiken
author_rank: Contributor
timestamp: November 22, 2017, 07:02:10 pm
content: Thanks guys, you're definitely helping me narrow this down.Any difference between the LAN8740A and DP83848C? Is software easier for one or the other?

author: mrpackethead
author_rank: Super Contributor
timestamp: November 22, 2017, 08:10:01 pm
content: the 8740A is lower cost and softeware wise no more difficult than the DP8348C. Its a bit newer and uses less power as well.

author: Arjen_Arg
author_rank: Contributor
timestamp: November 23, 2017, 05:42:09 am
content: if you go the PIC32MZ path, and end up designing your own board, remember to read the errata sheet. I learn this the hard way, but the silicon has huge issues with crystal oscillators.

author: BrianHG
author_rank: Super Contributor
timestamp: November 23, 2017, 06:15:25 am
content: Quote from: Arjen_Arg on November 23, 2017, 05:42:09 amWith crystals.... Yes... Read and follow... I recommend just using a 24MHz crystal.However, no problems at all with a ttl/cmos output crystal oscillator feeding the CLKin, if you want to play it dead safe under all conditions route... Again I recommend 24MHz oscillator.

author: mrpackethead
author_rank: Super Contributor
timestamp: November 23, 2017, 08:06:48 am
content: Unless you really need the accuracy of the oscillator you can just use the internal RC and it works well

author: BrianHG
author_rank: Super Contributor
timestamp: November 23, 2017, 09:54:01 am
content: Quote from: mrpackethead on November 23, 2017, 08:06:48 amUSB support is a problem with the internal RC oscillator...

author: NorthGuy
author_rank: Super Contributor
timestamp: November 23, 2017, 06:09:37 pm
content: You can use LAN8742A PHY. It is smaller and cheaper than 8740A. You'll also need an oscillator for PHY.PIC32xxMZ has high speed USB. If looking at PIC32 and full speed is Ok then consider also at PIC32MX675F512 or PIC32MX695F512.What you want can certainly be done with PIC18F67J50 and ENC28J60 (or ENC28J600) if you have any reasons to do it that way.

author: mrpackethead
author_rank: Super Contributor
timestamp: November 23, 2017, 07:24:07 pm
content: I dont' think the 8742A is supported in Harmony yet.

author: NorthGuy
author_rank: Super Contributor
timestamp: November 23, 2017, 10:32:17 pm
content: Quote from: mrpackethead on November 23, 2017, 07:24:07 pmI think it's practically the same as 8740A, except with MII removed. They made it so compact, it doesn't even have a ground pin - the only ground connection is the QFN ground pad.

author: forrestc
author_rank: Unknown
timestamp: November 23, 2017, 10:57:57 pm
content: Quote from: pratiken on November 21, 2017, 09:32:41 pmI'm with others who will suggest the PIC32MZ...EF. It's got enough flash you won't usually need any external memory.Depending on your budget vs time situtation, I'd actually suggest you consider the PIC32MZ.. EF starter kit:http://www.microchipdirect.com/product/search/all/DM320007-CThis will actually have an onboard programmer (slow but usable), and all of the circuitry needed to experiment with both ethernet and usb host/device connections.If you really need a lot of memory, you could also consider the PIC32MZ DA series, which has up to 32MB of internal SDRAM in addition to the normal static ram/flash of the EF, or can be obtained with an external SDRAM interface if you need even more. There are starter kits for this available as well.

author: mrpackethead
author_rank: Super Contributor
timestamp: November 23, 2017, 11:12:52 pm
content: I should check this up?