Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Attiny841 strange behaviour in Bascom
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
protoncek

Bascom Member



Joined: 16 May 2011
Posts: 43
Location: Slovenia

slovenia.gif
PostPosted: Wed Jul 02, 2014 3:01 pm    Post subject: Reply with quote

Ok, thanks. That's quite enough for me. I don't have chip yet, but before i buy it i wanted to make sure that it will be suppported. It's very interesting chip because it has UART onboard.
It's no rush, i'm looking forward for next update.

Thanks!
Back to top
View user's profile Visit poster's website
GeEmDeBeE

Bascom Member



Joined: 02 Dec 2014
Posts: 3

PostPosted: Tue Dec 02, 2014 7:11 pm    Post subject: Reply with quote

Hallo,

Hier meine Erfahrungen mit dem attiny841:

- ich bin auf den Attiny841 gestossen und habe mal 50 Stück gekauft, da er sehr preiswert ist
- ich bin GALEP-5 Besitzer und man hat mir den Chip auf Anfrage kostenlos implementiert
- daher habe ich die ISP-Problematik (von der ich öfter lese) direkt links liegengelassen
- den Chip habe ich auf einem DIL-14 Testsockel (kleine Platine gemacht)
- der Chip wird von GALEP anstandslos programmiert und ge-verified
- das DAT-File habe ich von hier und auch die besagte fehlende Zeile eingefügt
- BASCOM compiliert anstandslos, aber der Chip muckt nicht.....sieht auf dem Scope aus, als wenn kein Oszillator läuft
...habe es nicht getimt, aber das könnten die erwähnten 29Hz sein........
- habe es mit internem Osz oder Quarz probiert - nichts ändert sich
- ein neuer Versuch bestand in einem einfachen Assemblerprogramm, das nur DDRA setzt und dann eine Variable auf den Port gibt und dann inkrementiert
- DAS LÄUFT EINWANDFREI !

Was ich nicht verstehe, ist, was BASCOM macht, was dem Chip nicht passt ! Wenn ich alle Zeilen streiche und sofort zu einer simplen LOOP komme, passiert ebenfalls nichts Gescheites. Das ASM-Programm, das sofort läuft (mit GAVRASM assembliert) sieht so aus:


;Test_PortA_V2.asm
.nolist
.include "8515def.inc" ; diese Zeile ist per GAVRASM nicht "nötig", aber ohne sie meckert er.....
.list
.def Portabyte = r15

ldi r16,0xFF
out DDRD,r16

loop:
out PORTA,portabyte ; 2 Takte
inc portabyte
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop

rjmp loop ;

Hat jemand Erfahrungen / Tips etc..........??

Ist´n toller kleiner Chip und vor allem hat er 2 USARTs !!

Gruß
Georg
Back to top
View user's profile
GeEmDeBeE

Bascom Member



Joined: 02 Dec 2014
Posts: 3

PostPosted: Tue Dec 02, 2014 7:13 pm    Post subject: Reply with quote

Sorry, I just see that this thread is in English. If you lie, I will translate my post.

Georg
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5093
Location: Holland

blank.gif
PostPosted: Tue Dec 02, 2014 8:19 pm    Post subject: Reply with quote

it is a known issue solved in the next release. this tinyx41 series has a different WD timer compared to other AVR chips.
you are right, it is a great chip. especial for the price and size and hardware atmel included.

_________________
Mark
Back to top
View user's profile Visit poster's website
GeEmDeBeE

Bascom Member



Joined: 02 Dec 2014
Posts: 3

PostPosted: Thu Dec 04, 2014 4:01 pm    Post subject: Attiny841 strange behaviour Reply with quote

Hi,

I was successful yesterday in solving the known 841 problem.
I have been thinking about your 29Hz and I have read Mark´s words.
The 29Hz is the shortest possible watchdog interrupt/restart.
After writing 111 to the watchdog configure register, the restarts only happen every 2 seconds.

I have tried to switch OFF the watchdog with several tricks - none seemed to work.
Even to setting and resetting the WDTON fuse bit didn´t work !

Today I say:

- everything works except disabling watchdog - I have transmitted data with both UARTS !!
- The 841-DAT file is correct
- I have helped myself by performing a "reset watchdog" at the bottom of my main loop

Georg
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum