Ok, you've asked a lot of questions - I'm only going to touch a few. But first a piece of advice - Tags. Many people only subscribe to certain topics and won't see your post. I've added the [PIC:] tag, which is appropriate for this question. Other points inserted below. > > Hi, > > I'm self-taught in electronics and just diving into the PICs. I would Welcome, glad to have you. > appreciate any help on the following question, but first here are my > choices, so far : > > I'm considering the PIC18F4620-I/P-ND because it has a lot of I/O's (36), > it's fast (40MHz), has flash memory, and 64KB of program memory. Although > it's A/D can sample at only 100 ksps. Therefore I would disable the internal > A/D and ad my own external A/D, preferably over 1msps. > > If I had to settle for 200 ksps A/D sample rate :-((( then I would pick > PIC18F4431-I/P-ND, which samples at 200 ksps, 40MHz, flash memory, 36 I/O's, > and 16KB of program memory. > > This is a budget project so I would like to build my own programmer. Here's > one site that seems interesting, which includes the above PIC chips: > http://hyvatti.iki.fi/~jaakko/pic/picprog.html > > > 1) I've searched for typical power consumption for most PIC18F chips and > have only seen Power Dissipation under Absolute Maximum Ratings, which seems > to always be 1W. Is that typical power consumption? I'll be using the chip > at full speed 40MHz. If I use an external A/D then perhaps there's a way of > disabling the internal A/D and saving some power. The 18F parts are a fine starting place. > 2) I'd like to achieve A/D sample rates up to 1 msps. This seems possible > only with DSC's. Therefore, I'd like to ad an external A/D. I gather that > the PIC18F ports are also TTL compatible. So the A/D output bits can hook > directly to do MCU ports. Does anyone know how many cycles it takes to read > one of the 8 bit ports in TTL mode (not analog)? I'm forced to wonder what you need that much A/D for, and frankly what you're going to do with it if you have it :-). The PIC architecture divides the clock by four internally, so a 40Mhz clocked chip is running at 10 MIPS. At 1M sample/sec you'd only have 10 instruction cycles to read it and do something about it. Enough to store it to RAM, but not much else - and PICs don't have much RAM, so you won't be doing it for long :-) If you really need this much A/D, one of the DSPIC30Fxxxx parts might be a better fit. BTW, it takes one instruction to read an 8-bit input port into the working register, one more to save it to RAM. (all instructions take one cycle, except loops and branches, which take two) > 3) I referred to a url link above that freely provides a programmer circuit > which seems to work with PIC18F4620 and PIC18F4431. Does anyone have any > experience or knowledge about that programmer? Any possible foreseen > gotchas? From what I can tell in the datasheets, it seems that if a > programmer works for a particular PIC18F chip then it will work on any > PIC18F chip. If this is correct then perhaps I should build a more popular > PIC18F programmer. This type of programmer doesn't use the serial port in the "normal" manner. The programming algorithm for PICs is _basically_ clocked serial (lots of variation among the product line, but that's not the point here) programmers like this toggle the handshaking lines on the serial port to send the data. They DO NOT work with USB - serial adaptors, are likely not to work with modern laptops and even some new desktops are having issues. I wouldn't recommend one for a professional or a clueless hobbyist - not that I'm calling you clueless, just they can be finicky and troublesome so I wouldn't recommend it for somebody that's doing it for a living or can't troubleshoot a problem. But I use one- I have the PG2C from Olimex. Like $15 fully assembled (www.olimex.com or www.sparkfun.com - stocking distributor for the US) There's a lot of support on this list for the WISP from Wouter van Ooijen (just don't ask me how to pronounce it :-) you can get it here: http://www.voti.nl/shop/index.html About $30 US for a full kit, and if memory serves, it's open sourced, so you can build it without the kit if you like. There's also the easyprog from Olin Lathrop you can get from http://www.embedinc.com/easyprog/index.htm Several variants between the $14 bare board and the $100 fully assembled unit are available. Both of these are from active members of this list and are well supported. They also use the serial port in the "normal" way, so they don't suffer the same limitations as the one you suggested. You would be well served by one of these. > 4) Is it unreasonable to try and program this in asm verses C? Eventually > I'd like to buy Microchip C18 toolsuite, but not right now. Has anyone tried > the free cpik on any PIC18xxx chips? They list numerous PIC18F chips that > cpik should work on, but I don't see PIC18F4620 or PIC18F4431 listed. Here's > there website : > http://pikdev.free.fr/ > http://pikdev.free.fr/download-cpik.php3 The compiler vs. asm debate in it's various forms has produced terabytes worth of debate over the years - you won't find a definitive answer. Personally, I don't like assembler - never did, never will. But some understanding of it is absolutely necessary to understanding what's going on inside a chip. Many people use assembly exclusively, and you'll find plenty of them willing to help you here on this list. > 5) The programmer I'm looking to build is serial port. I'm trying to get an > idea how long it will take to program 64KB. I calculate at 9600 baud it > would take over 50 seconds. Does that sound about right length of time? Like I said above, the programmer you're looking at isn't really serial, but yeah, that's in the ballpark. A few months back there was some conversation about this and we run some actual tests, you can peruse the results here: http://www.piclist.com/techref/microchip/devprogspeed.htm > I appreciate any advice or help, > Paul > -- And probably the best nugget of info I can give you, www.piclist.com I guess you could call it the home page for this list, but it's so much more; full archive of this list, tutorials, code examples, to much to list really. It's maintained at personal expense by our way excellent and seriously under appreciated host, James Newton. Good luck, -Denny -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist