View previous topic :: View next topic |
Author |
Message |
Tiny
Joined: 10 Nov 2010 Posts: 107 Location: The Netherlands
|
Posted: Thu May 09, 2024 8:44 am Post subject: xtiny3227 |
|
|
Will the attiny3227 supported?
or can I adjust the dat file of the attiny3217 a bit so that it can be used by the attiny3227 |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 6063 Location: Holland
|
Posted: Thu May 09, 2024 9:24 am Post subject: |
|
|
yes it is in the next release.
i attached it. but it might not work since this series is different again. reason why it was not supported yet.
but you can try. you might need to remote the ENADISABLE section which is new.
as there are many new chips and changes i do not recall if the programmer also required a change for this.
but best to test it. _________________ Mark |
|
Back to top |
|
|
Tiny
Joined: 10 Nov 2010 Posts: 107 Location: The Netherlands
|
Posted: Thu May 09, 2024 10:07 am Post subject: |
|
|
Thanks Mark,
the most important thing for me is the 2x uart i'm going to test in soon |
|
Back to top |
|
|
Tiny
Joined: 10 Nov 2010 Posts: 107 Location: The Netherlands
|
Posted: Sat May 11, 2024 7:44 am Post subject: |
|
|
HI Mark,
Testing with simple program, compiler gives error
bascom version 2086
compiler version 001
ide version 002
[/img] |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 6063 Location: Holland
|
Posted: Sat May 11, 2024 10:42 am Post subject: |
|
|
did you remove the [ENADISABLE] section and entries from the DAT file?
that is for 2087 _________________ Mark |
|
Back to top |
|
|
Tiny
Joined: 10 Nov 2010 Posts: 107 Location: The Netherlands
|
Posted: Sat May 11, 2024 3:46 pm Post subject: |
|
|
Hi Mark
removing section [ENADISABLE] solves the error.
Thanks |
|
Back to top |
|
|
Tiny
Joined: 10 Nov 2010 Posts: 107 Location: The Netherlands
|
Posted: Fri May 24, 2024 3:37 pm Post subject: |
|
|
Hi Mark,
can I use then attiny3227.dat also for the attiny3226
because for the first photo I use the attiny3226
when testing on the attiny3226 the timers do not work. these ensure that the LED in the main loop does not flash. If I remove the call to int_tca0, 1 LED flashes
Code: |
$Regfile="atxtiny3227.dat"
$Crystal=20000000
$hwstack = 100
$swstack = 100
$framesize = 100
Config Submode = New
'*******************************************************************************
' Config Clock
'*******************************************************************************
Config_clock:
Config Sysclock = 16_20MHz , Prescale = 1 , Clockout = disabled
'*******************************************************************************
' Config IO
'*******************************************************************************
Config_io:
Config Porta.5 = Output
Config Portc.0 = Output
'*******************************************************************************
' Config Timer TCA0 as 100msec
'
' 1
' ----------
' (20MHz/64) = 0.0000032 x 31250 --> 100mSecOne Tick
' Setup overflow interrupt of Timer/Counter C0 and
' Enable overflow interrupt in LOW Priority
'*******************************************************************************
Config_timer_tca0:
Config Tca0 = Normal , Prescale = 64 , Resolution = Normal , Run = On
Tca0_per = 31250 ' = 100msec
' On Tca0_ovf Int_tca0
Tca0_intctrl = 1
'******************************************************************************
' Config Comport
'******************************************************************************
Set Portc.0
Reset Porta.5
Enable Interrupts
do
Toggle Porta.5
' Toggle Portc.0
Waitms 50
loop
End
'******************************************************************************
' Interrupt routine for TCB0
'******************************************************************************
Int_tca0:
Toggle Portc.0
Return
|
|
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 6063 Location: Holland
|
Posted: Fri May 24, 2024 4:00 pm Post subject: |
|
|
the 3226 and 3227 are similar. the DAT should work for both. the interrupt table is the same. just change the device id in the dat file.
the timers should work. it is not clear if it worked with your proto?
after the ISR you must reset the interrupt flag. TCA0_INTFLAGS=1 to reset the OVF flag _________________ Mark |
|
Back to top |
|
|
Tiny
Joined: 10 Nov 2010 Posts: 107 Location: The Netherlands
|
Posted: Mon May 27, 2024 9:10 am Post subject: |
|
|
Hi Mark,
reset the OVF flag does the Job.
Thanks. |
|
Back to top |
|
|
|