Attiny841 DSC error?

wsandor
Benutzer
Avatar
Gender: n/a
Age: 53
Posts: 21
Registered: 07 / 2012
Subject:

Attiny841 DSC error?

 · 
Posted: 10.08.2016 - 09:35  ·  #1
Hi!

I've started a new project with Attiny841. First it gave some errors like "dsc-file error adding: USR1". I've find a corrected DSC file here in another topic (tiny841). The first errors are gone, but other newer ones come after ar included SerPort and SerPort2 to the project. And even newer ones when I set the fuse bits. I tried to cerrect the dsc file. First it seemed to be a success - the program compiled without errors. But unfortunately I can't program the processors. At first try a Flash verify error at 0000 error came and after it always a Wrong Device-ID: 000000... I tried to replace the processor, but the result is the same, first Flash verify error, then wrong device id. (My compiler's version is 5.05.04) What could be the error? Do you have a newer correct dsc file for attiny841? I've attached my modified dsc file. Can you please check it? Maybe I made some error there...

Thanks in advance

Sandor Wortmann
Attachments
Filename: pTiny841.zip
Filesize: 1.83 KB
Title: modified attiny841 dsc file
Download counter: 38
Gunter
Administrator
Avatar
Gender:
Location: Frankfurt Main / Germany
Posts: 1697
Registered: 02 / 2003
Subject:

Re: Attiny841 DSC error?

 · 
Posted: 10.08.2016 - 10:24  ·  #2
Hi Sandor,

your first and biggest problem is the communication with the ATTiny
Quote
Flash verify error at 0000 error came and after it always a Wrong Device-ID: 000000...

only "0000000" means always "no communication at all".
Use a new one and do NOT try to write Flash/EE/Fuses!
First read back the fuses ("refresh button"). Try this several times!
If this does not work, any write attempt may destroy the next chip by writing the fuses!

Gunter
wsandor
Benutzer
Avatar
Gender: n/a
Age: 53
Posts: 21
Registered: 07 / 2012
Subject:

Re: Attiny841 DSC error?

 · 
Posted: 10.08.2016 - 12:15  ·  #3
Hi Gunter,

Thanks for your quick reply!
You are right, it was my fault, I've set the CKSEL fuses wrongly, and forget to set the programmer clock to 1Mhz. Now I can program the processor.
A simple program which only blinks an LED works correctly. But when I include Serport and try to use ser_enable, serstat, serinp the program hangs even when absulutely no data arrves to the processor. Could you please check the dsc files I sent, because I have to changed some serial related parameters (USART interrupt vectors) in it in order to be able to compile the code without errors, and I am not sore I do it in the proper way.

Sandor
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Attiny841 DSC error?

 · 
Posted: 10.08.2016 - 15:16  ·  #4
Hello Sandor,

the TINY8xx don't provide an UART. They only have a crippled USI interface
which can be used as a simple UART. But not supported in AVRco.

In the attachment there is a driver for USI - UART, but no complete application.
But no support here.
Why do you use such a Mickey Mouse?? There are other TINYs with real UARTS.

rolf
Attachments
Filename: E-LAB.zip
Filesize: 6.46 KB
Title:
Download counter: 23
wsandor
Benutzer
Avatar
Gender: n/a
Age: 53
Posts: 21
Registered: 07 / 2012
Subject:

Re: Attiny841 DSC error?

 · 
Posted: 10.08.2016 - 15:40  ·  #5
Hello Rolf,

I am afraid that you are wrong, Attiny841 (and 441 also) has "Two Full Duplex USARTs with Start Frame Detection", so I think it should be working if everything in its palce.
Meanwhile I removed the SerPorts from my code and write a little serial receive rutine myself. It working (with interrupt), so I think there should be some problem with the code that AVRco generates for this type of microcontroller.

Best regards,

Sandor
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Attiny841 DSC error?

 · 
Posted: 10.08.2016 - 18:26  ·  #6
Hello Sandor,

sorry, my error. I looked into the TINY861 datasheet.

rolf
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Attiny841 DSC error?

 · 
Posted: 13.08.2016 - 15:41  ·  #7
Hello Sandor,

now I fixed the problems in the TINY841 DSC file.

rolf
Attachments
Filename: AVRco.zip
Filesize: 3.6 KB
Title:
Download counter: 26
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 18 · Cache Hits: 15   128   143 · Page-Gen-Time: 0.052554s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI