Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

attiny1634 and serial communication (BUG in attiny1634 ?)

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
muellner

Bascom Member



Joined: 18 Jan 2006
Posts: 5

austria.gif
PostPosted: Thu Jan 17, 2013 12:08 pm    Post subject: attiny1634 and serial communication (BUG in attiny1634 ?) Reply with quote

Hi,

i encounter a problem when trying to

config com1=9600, synchrone=0,parity = none,stopbits=1,databits=8,clockpol=0

I get a compile error :

.EQU not found, probably using functions that are not supported by the selected chip [UCSRC]


There are also errors if i try to :

config serial = buffered, size=20

saying interrupt USRX not found.

When i search attiny1634.dat i cannot find USRX, also no USRC ...

Any suggestions ?
Back to top
View user's profile
muellner

Bascom Member



Joined: 18 Jan 2006
Posts: 5

austria.gif
PostPosted: Thu Jan 17, 2013 1:30 pm    Post subject: Reply with quote

According to the datasheets, tiny1634 and mega162 are using the same USART structure.
If I compile my prog with regfile m162def.dat, i dont get any error. So to me, it seems there's an error in the

attiny1634.dat,

but i don't know how to fix it ....

thx in advance

Wilhelm
Back to top
View user's profile
Meister

Bascom Member



Joined: 27 May 2010
Posts: 314

PostPosted: Thu Jan 17, 2013 1:33 pm    Post subject: Reply with quote

Good to know. I am right now preparing a PCB for using Attiny1634. So I should postpone it until a fix has been found...
In the dat files there is a difference:
Code:
Attiny1634:
uarts=2 ;2 uart in this chip
uart1=5 ; extended uart
uart2=5


Code:
m162:
uarts=2 ; 2 uart in this chip
uart1=3 ; extended uart with shared register ubr/ucsrc ursel bit must be o to update UBRRHI
uart2=3 ; dito


Don't know what to do with it.

Meister
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5089
Location: Holland

blank.gif
PostPosted: Thu Jan 17, 2013 2:28 pm    Post subject: Reply with quote

search for :
UCSR0C = $24
and add this below :
UCSRC = $24

or simply change the ucsr0c into ucsrc

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

Administrator



Joined: 09 Apr 2004
Posts: 5089
Location: Holland

blank.gif
PostPosted: Thu Jan 17, 2013 8:45 pm    Post subject: Reply with quote

also the INT section must look like this :

Code:
[INTLIST]
count=27
INTname1=INT0,$002,GIMSK.INT0,GIFR.INTF0
INTname2=PCINT0,$004,GIMSK.PCIE0,GIFR.PCIF0
INTname3=PCINT1,$006,GIMSK.PCIE1,GIFR.PCIF1
INTname4=PCINT2,$008,GIMSK.PCIE2,GIFR.PCIF2
INTname5=WDT,$00a,WDTCSR.WDIE,WDTCSR.WDIF
INTname6=ICP1@CAPTURE1,$00c,TIMSK.ICIE1,TIFR.ICF1
INTname7=OC1A@COMPARE1A,$00e,TIMSK.OCIE1A,TIFR.OCF1A
INTname8=OC1B@COMPARE1B,$010,TIMSK.OCIE1B,TIFR.OCF1B
INTname9=OVF1@TIMER1,$012,TIMSK.TOIE1,TIFR.TOV1  
INTname10=OC0A@COMPARE0A,$014,TIMSK.OCIE0A,TIFR.OCF0A
INTname11=OC0B@COMPARE0B,$016,TIMSK.OCIE0B,TIFR.OCF0B
INTname12=OVF0@TIMER0,$018,TIMSK.TOIE0,TIFRK.TOIE0
INTname13=ACI,$01a,ACSRA.ACIE,ACSRA.ACI
INTname14=ADCC@ADC,$01c,ADCSRA.ADIE,ADCSRA.ADIF
INTname15=URXS,$01e,UCSR0D.RXSIE0,UCSR0D.RXS0
INTname16=URXC@SERIAL,$020,UCSR0B.RXCIE0,UCSR0A.RXC0
INTname17=UDRE,$022,UCSR0B.UDRIE0,UCSR0A.UDRE0
INTname18=UTXC,$024,UCSR0B.TXCIE0,UCSR0A.TXC0
INTname19=URSX1_RXS,$026,UCSR1D.RXSIE1,UCSR1D.RXS1
INTname20=URXC1,$028,UCSR1B.RXCIE1,UCSR1A.RXC1
INTname21=URDRE1,$02a,UCSR1B.UDRIE1,UCSR1A.UDRE1
INTname22=UTXC1,$02c,UCSR1B.TXCIE1,UCSR1A.TXC1
INTname23=USI_START,$02e,USICR.USISIE,USISR.USISIF
INTname24=USI_OVF,$030,USICR.USIOIE,USISR.USIOIF
INTname25=TWI,$032,TWSCRA.TWDIE,TWSSRA.TWDIF
INTname26=ERDY,$034,EECR.EERIE        
INTname27=QTRIP,$036,

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

Bascom Member



Joined: 18 Jan 2006
Posts: 5

austria.gif
PostPosted: Fri Jan 18, 2013 12:00 pm    Post subject: Thanx ! Reply with quote

Problems solved, BIG thanks to Mark !

Wilhelm
Back to top
View user's profile
thiagorod

Bascom Member



Joined: 13 Nov 2008
Posts: 109

brazil.gif
PostPosted: Fri Nov 21, 2014 6:35 pm    Post subject: Reply with quote

Hello,

Sorry for the late reply on that subject, but I have a project with Attiny1634 and I canīt find the attiny1634.dat file under BASCOM folder. I am using DEMO 2.0.7.5 version. Is this file only available in full BASCOM version?

Best Regards,
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
Page 1 of 1

 
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