Attiny841 DSC error?

wsandor
Benutzer
Avatar
Geschlecht: keine Angabe
Alter: 54
Beiträge: 26
Dabei seit: 07 / 2012
Betreff:

Attiny841 DSC error?

 · 
Gepostet: 10.08.2016 - 09:35 Uhr  ·  #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
Der an diesem Beitrag angefügte Anhang ist entweder nur im eingeloggten Zustand sichtbar oder die Berechtigung Deiner Benutzergruppe ist nicht ausreichend.
Gunter
Administrator
Avatar
Geschlecht:
Herkunft: Frankfurt Main / Germany
Beiträge: 1697
Dabei seit: 02 / 2003
Betreff:

Re: Attiny841 DSC error?

 · 
Gepostet: 10.08.2016 - 10:24 Uhr  ·  #2
Hi Sandor,

your first and biggest problem is the communication with the ATTiny
Zitat
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
Geschlecht: keine Angabe
Alter: 54
Beiträge: 26
Dabei seit: 07 / 2012
Betreff:

Re: Attiny841 DSC error?

 · 
Gepostet: 10.08.2016 - 12:15 Uhr  ·  #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
Geschlecht:
Herkunft: Germany
Alter: 26
Homepage: e-lab.de
Beiträge: 5558
Dabei seit: 03 / 2002
Betreff:

Re: Attiny841 DSC error?

 · 
Gepostet: 10.08.2016 - 15:16 Uhr  ·  #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
Der an diesem Beitrag angefügte Anhang ist entweder nur im eingeloggten Zustand sichtbar oder die Berechtigung Deiner Benutzergruppe ist nicht ausreichend.
wsandor
Benutzer
Avatar
Geschlecht: keine Angabe
Alter: 54
Beiträge: 26
Dabei seit: 07 / 2012
Betreff:

Re: Attiny841 DSC error?

 · 
Gepostet: 10.08.2016 - 15:40 Uhr  ·  #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
Geschlecht:
Herkunft: Germany
Alter: 26
Homepage: e-lab.de
Beiträge: 5558
Dabei seit: 03 / 2002
Betreff:

Re: Attiny841 DSC error?

 · 
Gepostet: 10.08.2016 - 18:26 Uhr  ·  #6
Hello Sandor,

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

rolf
rh
Administrator
Avatar
Geschlecht:
Herkunft: Germany
Alter: 26
Homepage: e-lab.de
Beiträge: 5558
Dabei seit: 03 / 2002
Betreff:

Re: Attiny841 DSC error?

 · 
Gepostet: 13.08.2016 - 15:41 Uhr  ·  #7
Hello Sandor,

now I fixed the problems in the TINY841 DSC file.

rolf
Der an diesem Beitrag angefügte Anhang ist entweder nur im eingeloggten Zustand sichtbar oder die Berechtigung Deiner Benutzergruppe ist nicht ausreichend.
Gewählte Zitate für Mehrfachzitierung:   0

Registrierte in diesem Topic

Aktuell kein registrierter in diesem Bereich

Die Statistik zeigt, wer in den letzten 5 Minuten online war. Erneuerung alle 90 Sekunden.
MySQL Queries: 8 · Cache Hits: 14   127   141 · Page-Gen-Time: 0.022984s · Speichernutzung: 2 MB · GZIP: ein · Viewport: SMXL-HiDPI