Strange ISP Connections on a Mega103

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

Hi Guyzz

I have been looking at this Mega103/128 board , it seems like one that is possible to do at home (Single sided , eagle layout)

But i do not understand the 4053 analog switch he is using , to pin2/pin3 from the Mega , between a max202 and the ISP plug :?: :?:

Arent MISO/MOSI used on a Mega103/128 , to do ISP programming ???

Can anyone help out here ???

/Bingo

Documentation in german (Schematic at last page)
http://www.ulrichradig.de/site/a...

Webpage
http://www.ulrichradig.de/site/a...

The Eagle Project
http://www.ulrichradig.de/site/a...

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

If you look carefully at a M128 based board and it says Rev 2 or Rev B, then somebody probably got bit by this. On the M128 they use PE0 and PE1 for ISP programming. Since these pins are also part of the USART1 interface, there needs to be some way of isolating them during programming. That's probably what you're seeing.

Dave

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

Dave has it right. The 4053 is switching between the ISP programming mode, and the UART. The 4053 switch design comes form Atmels reference design, back in the stk300 days.

In any case, the RESET line is used to perform the switch on the 4053. So when reset is pulled low, the 4053 connects PE0 and PE1 to the ISP header. When reset is high, the 4053 connects the PE0 and PE1 lines to the MAX232 (or equivalent).

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

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

So on a M128 you dont use MISO/MOSI for ISP :?: :?:

Dammm , i would have been caught there :evil: :evil:

Thanx guyzz

/Bingo

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

Bingo600 wrote:
Dammm , i would have been caught there

Like I say, you would not have been the first one. The MOSI and MISO pins are strictly SPI interface only - completely decoupled from programming. The only reason I never got bit on this was I started out with some commercial boards and studied those schematics before I ever did my first board.

Dave

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

I find that reading the manual to confirm what I think about a block or function can also stop errors as well. The old saying measure twice do the job once. And do not rely on what you are told check it for yourself.

Keep it simple it will not bite as hard