Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with ISP programming when using MISO, MOSI, SCK pins in code

Status
Not open for further replies.

stringskipper

Newbie level 5
Newbie level 5
Joined
Aug 5, 2008
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,378
Hi everybody,
i have problem during a reprogramming ATTiny 2313. On a PORTB i've conected 7-seg display, so i'm using MISO, MOSI and SCK during a code execution. Everything works fine ONLY first time when i put down code to the microcontroller. Test code just blinks some number on 7-seg display. But when i try to change code, i get "no response" from microcontroller. I've tried to disconnect programing pins from 7-seg display, so i've put microcontroller on a diferent board, only with pins for programming and power supply, but problem is still present. Using another, "empty", microcontroller i get stuck in a same situation. First time, everything is ok, but second time there is a problem. Some how "old" program is making a trouble with SPI connection. Tried to put some pull-up's on programming lines, but nothing sucessuful. On schematic, programming pins are connected via resistor (330) to 7seg anode, which cathode is connected to collector of bjt (common emitter). If picture is needed, i will upload it, so as schematic of programmer.

- - - Updated - - -

Fuse bits are correct. I'm running internal oscillator, by default.
 

Are you sure that you didn't change the SPIEN and RSTDISBL fuses?

- - - Updated - - -

I also assume that the display is used properly with a resistor so that the pins can't be damaged.
 

This is fuse bits configuration, schematic of programer and board with display.



- - - Updated - - -

I think that problem is not with fuse bits, because i've programmed several codes without problem. This happens only when putting code for display. On a two different microcontroller!

- - - Updated - - -

Now i push the reset button, before pressing "signiture", and keep it reseted about half a second, and then sometimes i get the response code. With this, when i try to flash code, something starts, but ends up shortly and bring me message: "no response". Again, this situation is same on different boards.
 

You have to disconnect displays while programming (displays drain the voltages at programming pins)
 

I've done that much earlier. I've removed microcontroller from this board and put it on header with only pins for programming, quartz, noise capacitors, reser resistor and power supply. Is there any way to erase chip?
 

To erase the chip you have to connect to it first , unless of course you use a standalone device like **broken link removed**

I'm not sure if this is a problem of your programmer or if there is something wrong with the board.

Do you have access to a different programmer?
 

This programmer works on another tiny 2313 which i didn't used for driving display. Now, i've managed to erase chip by fast clicking reset button, during a erase cycle. So, putting it back, when testing everything but display, works fine. Programmer and code are ok. It seems that somehow my reset voltage drops and "old" code that running display through programming pins corrupting messages from programmer.

- - - Updated - - -

Forget to mention this, i've done this (manually switching reset) on a board without display.
 

The reset is normally controlled by the programmer, maybe it is a programmer problem.

You should consider building a USBasb or a USBtiny
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top