Hardware functions such as PWM are hard-coupled to specific pins. You can generate software PWM that uses any pin. Likewise, UART, SPI, TWI, ISP, etc, are all hard-coupled to specific pins. Again, you can implement any of these things in software on almost any pin. But, its REALLY hard to use internal UART hardware with arbitrary Tx and Rx pins. Jim On Tue, 21 Nov 2006 04:48:39 -0000 "luthjej" <luthjej@yahoo.com.au> wrote: > Hi all, > I'm new to this group, predominantly because I've > always used PIC's > for control applications - but I've decided that it's > time to give the > AVR a whirl; the feature list on the mega series AVR's is > just too > good to pass up! :) > > For my first design, I'm using a mega8 MCU for a closed > loop > automotive control circuit, nothing terribly fancy, but > I'm just > wondering about port allocations in terms of digital > I/O's - I know > that on the older MCU's (PIC12Fxx, HC11 etc) there were > significant > restrictions on what ports can be used for what function > (i.e. PWM was > restricted to only a few pins, some ports were input or > output only etc). > > So, just before I go and get the PCB printed up, I was > just hoping > that the knowledgable could cast their eye on my pin > allocations that > I'm not doing anything impossible (or anything that's a > particularly > bad idea! :). > > I've read the data sheet cover to cover, and haven't come > across > anything yet, although I'm still a bit vague as to which > pins can > actually support PWM and whether different pins on > different ports can > be allocated to different functions at the same time (e.g > ADC Port - > can I do digital logic in, logic level out AND ADC > conversion - all at > the same time? > > PB0 - Out Piezo Buzzer Out (Direct Drive 20mA Max) > PB1,2 - Out PWM Drive 1,2 (to FET driver IC) > PD0,1 - In/Out RS232 Out via MAX232 > PD2-7 - LCD Display Out > PB6 - Out SPI Device Slave Select > PB7 - In Keyboard (switches via 1N914's across PD2-7) > PC0 - 0-5v analogue in (for ADC use) > PC1-3 - +12v logic in (direct connect via 1k resistor) > PC4 - 0-5v analogue in (for ADC use) > PC5 - FET Drive (on/off) via FET Driver IC > > MISO, SCK, MOSI - SPI Bus & ICP Header (Also LED via 500R > resistor to > indicate SPI activity) > > AREF,AVCC,VCC - Regulated +5v (no decoupling - direct > connect) > > > > Thanks in advance for your help. > > > Jon > > > --------------------------------------------------------------- The Think Different Store http://www.thinkdifferentstore.com/ For All Your Mac Gear ---------------------------------------------------------------
Message
Re: [AVR-Chat] AVR port pin verification help?
2006-11-22 by Jim Wagner
Attachments
- No local attachments were found for this message.