ATMega48 - PORTB and PORTC only outputting 6 LSB's

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What do I have to do to be able to use PB6, PB7, PC6 and PC7 as outputs?

PORTD is the only port I've been able to get all 8 LED's to turn on (programming with on the STK500.) On PORTB and PORTC, the 2 MSB's will not change state.

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PB6 and PB7 are also used for the crystal. Are you using an external crystal?

PC6 is the reset pin- can't use as an output unless you change the fuse (don't do it).

PC7. There is no PC7.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You need to do special STK500 cabling to get PB6 and PB7; from the AUX header IIRC. Look at AVRStudio Help; search the Forum for "pb6 pb67 stk500 mega8".

Yes, PC7 >>would<< be a cute trick. And for PC6, then you need to re-cable for HV programming from then on.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Aha - thank you for the info. Yeah, my fault on the PC6/7 thing :).

I wasn't able to find that post, but I did find out the wiring.

PB5:0 wire as usual, of course....

PB6 = XT1, PB7 = XT2 (on the AUX header). With the supplied four 2-wire connectors, there are just enough to get it working.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I wasn't able to find that post, but I did find out the wiring.

???

Search found 19 matches
AVR Freaks Forum Index
  	 Forum  	 Topics  	 Author  	 Replies  	 Views  	 Last Post 
No new posts 	AVR forum 	ATMega48 - PORTB and PORTC only outputting 6 LSB's
	Psychlow 	3 	54 	Oct 05, 2007 - 09:35 PM
Psychlow View latest post
No new posts 	AVR forum 	ATMega8 pb6 and pb7 voltage level problem
[ Goto pageGoto page: 1, 2 ] 	bnocturnal 	22 	383 	Sep 14, 2007 - 10:32 PM
JackFoligie View latest post
No new posts 	AVR forum 	No ADC on Mega8515
	new2use 	12 	290 	Aug 17, 2006 - 01:19 PM
dl8dtl View latest post
No new posts 	AVR forum 	STK500 LED Question
	pupdawg 	2 	147 	Jun 09, 2006 - 05:54 AM
pupdawg View latest post
No new posts 	AVR forum 	**missing bits on portB [atmega8 & stk500]
	galazg 	4 	143 	May 24, 2006 - 03:42 PM
microcarl View latest post
No new posts 	AVR studio 4 forum 	mega8: XTAL/TOSC - pins (PB6+7)
	switch*blade 	2 	311 	Apr 21, 2006 - 02:07 AM
switch*blade View latest post
No new posts 	AVR forum 	ATmega8 PB6 and PB7 Output Issue (ISSUE SOLVED)
	sjpa 	5 	244 	Apr 13, 2006 - 03:26 PM
Bingo600 View latest post
No new posts 	AVR forum 	LCD no work on Mega8 PortB
	underwaterreefer 	6 	139 	Mar 14, 2006 - 05:13 PM
underwaterreefer View latest post
No new posts 	AVR forum 	ATMega8 ADC hookup, Help!
	atellis 	4 	128 	Mar 12, 2006 - 09:07 PM
theusch View latest post
No new posts 	AVR forum 	Atmega8 External RC Oscillator Question
	eh3 	9 	289 	Feb 20, 2006 - 06:13 AM
lfmorrison View latest post
No new posts 	AVR forum 	How do I use PB6 and PB7 on mega8?
	Sci 	2 	222 	May 30, 2005 - 05:45 PM
CountZero View latest post
No new posts 	AVR forum 	mega8 PB6,7 I/O problem
	magno_grail 	7 	272 	Mar 21, 2005 - 06:38 PM
theusch View latest post
No new posts 	AVR forum 	ATMEGA8: Cannot enable Port B6/B7
	stefanwurlitzer 	7 	273 	Jan 18, 2005 - 12:52 AM
stefanwurlitzer View latest post
No new posts 	AVR forum 	port problems with an mega8
	krazykarl 	8 	394 	Nov 22, 2004 - 01:32 PM
mneary View latest post
No new posts 	AVR forum 	Which microcontroller is the appropriate?
	Alexandros 	12 	582 	Jul 16, 2004 - 09:29 AM
pepsi View latest post
No new posts 	AVR forum 	Can PB6 and PB7 be used as general IO on a Mega8?
	Lawrence 	3 	35 	May 28, 2003 - 02:50 AM
Sean View latest post
No new posts 	AVR forum 	PB6 & PB7 on Mega8?
	StuartWhelan (Stuart Whe 	4 	77 	May 23, 2003 - 04:26 AM
StuartWhelan View latest post
No new posts 	AVR forum 	HELP, mega8 & portb
	engg100 (Josh Wolf) 	9 	15 	Jan 16, 2003 - 03:29 PM
lee View latest post
No new posts 	AVR forum 	Mega 8 STK500 ISSUE
	ginvent (Joseph Gottlieb 	11 	162 	Sep 17, 2002 - 08:35 AM
lee View latest post
 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.