Author |
Message |
Topic: GETRC not working with AVR128DA32 |
albertsm
Replies: 8
Views: 421
|
Forum: BASCOM-AVR XTINY/MEGAX/AVRX Posted: Tue Feb 27, 2024 4:01 pm Subject: GETRC not working with AVR128DA32 |
addition:
for xtiny you also need to mod the mcs.lib
- open mcs.lib
- locate this code :
sbiw r30,8 ; TEMP FIX since we always get PORTx_IN address, we need to adjust to PORTx_DIR by subbi ... |
Topic: GETRC not working with AVR128DA32 |
albertsm
Replies: 8
Views: 421
|
Forum: BASCOM-AVR XTINY/MEGAX/AVRX Posted: Tue Feb 27, 2024 3:50 pm Subject: GETRC not working with AVR128DA32 |
for xmega and xtiny use DDR register instead of PIN register.
i think with support of xmega, the compiler did not change the pin to ddr and since xtiny was added later it has the same problem.
if it ... |
Topic: Start Bascom with Profile? |
albertsm
Replies: 7
Views: 448
|
Forum: BASCOM-AVR Posted: Sun Feb 25, 2024 1:01 pm Subject: Start Bascom with Profile? |
yes, MWS is one of the few that read the help
to use a 'profile' you can use Options, Select Settings file and create a copy. the copy can have different parameters.
when you specify the opti ... |
Topic: AVR128DA32 an AC1 interrupt |
albertsm
Replies: 4
Views: 231
|
Forum: BASCOM-AVR XTINY/MEGAX/AVRX Posted: Fri Feb 23, 2024 12:56 pm Subject: AVR128DA32 an AC1 interrupt |
in your config the int=enabled is missing.
in my answer i wrote ac0 but you use ac1 so that must be AC1_STATUS.0 = 1 '
but it must go inside the ISR !
further you need to define what you mean ... |
Topic: AVR128DA32 an AC1 interrupt |
albertsm
Replies: 4
Views: 231
|
Forum: BASCOM-AVR XTINY/MEGAX/AVRX Posted: Fri Feb 23, 2024 11:43 am Subject: AVR128DA32 an AC1 interrupt |
you need to add enable global interrupts.
also many interrupt flags in this series must be manual reset.
in this case : AC0_STATUS.0 = 1 'reset int flag by writing a 1 |
Topic: Mcucsr: 2.0.8.6 - Does not work, 2.0.8.5 - ALL OK |
albertsm
Replies: 20
Views: 749
|
Forum: BASCOM-AVR Posted: Thu Feb 22, 2024 11:49 am Subject: Mcucsr: 2.0.8.6 - Does not work, 2.0.8.5 - ALL OK |
even in 2075 saving mcucsr into r0 existed.
your code never worked since mcucsr was cleared before your code executed.
Dim Begunok As Byte
Begunok = Mcucsr: Mcucsr = 0
should be :
... |
Topic: Mcucsr: 2.0.8.6 - Does not work, 2.0.8.5 - ALL OK |
albertsm
Replies: 20
Views: 749
|
Forum: BASCOM-AVR Posted: Thu Feb 22, 2024 11:35 am Subject: Mcucsr: 2.0.8.6 - Does not work, 2.0.8.5 - ALL OK |
but i do not think these projects were using 2085?
anyway since the first version of bascom-avr the compiler clears the watchdog flags, since otherwise a processor could hang.
only later the registe ... |
Topic: Mcucsr: 2.0.8.6 - Does not work, 2.0.8.5 - ALL OK |
albertsm
Replies: 20
Views: 749
|
Forum: BASCOM-AVR Posted: Thu Feb 22, 2024 10:46 am Subject: Mcucsr: 2.0.8.6 - Does not work, 2.0.8.5 - ALL OK |
beside all that your code is wrong too.
you must not reset mcucsr to 0. the compiler already does that for you. |
Topic: Mcucsr: 2.0.8.6 - Does not work, 2.0.8.5 - ALL OK |
albertsm
Replies: 20
Views: 749
|
Forum: BASCOM-AVR Posted: Thu Feb 22, 2024 10:42 am Subject: Mcucsr: 2.0.8.6 - Does not work, 2.0.8.5 - ALL OK |
you must do this as soon as possible. in your code.
one way is using $initmicro
also , you say it works in 2085 but that is either a coincidence or not true since it was changed long time ago.
... |
Topic: Mcucsr: 2.0.8.6 - Does not work, 2.0.8.5 - ALL OK |
albertsm
Replies: 20
Views: 749
|
Forum: BASCOM-AVR Posted: Thu Feb 22, 2024 10:13 am Subject: Mcucsr: 2.0.8.6 - Does not work, 2.0.8.5 - ALL OK |
check the config watchdog help. |
Topic: Fuzzy Yacht Autopilot |
albertsm
Replies: 10
Views: 1011
|
Forum: Share your working BASCOM-AVR code here Posted: Tue Feb 20, 2024 8:31 pm Subject: Fuzzy Yacht Autopilot |
thanks for sharing. I have no experience with this but i am sure it is of interest to others. lets see |
Topic: Bootloader on 328P |
albertsm
Replies: 5
Views: 417
|
Forum: BASCOM-AVR Posted: Tue Feb 20, 2024 8:27 pm Subject: Bootloader on 328P |
'write one or more pages
Writepage:
If Bkind = 0 Then
For J = 1 To 128 Step 2 'we write 2 bytes into a page
Vl = Buf(j) : Vh = Buf(j ... |
Topic: Lookup() - number of CPU cycles to execute seems high at 40 |
albertsm
Replies: 27
Views: 1291
|
Forum: BASCOM-AVR Posted: Mon Feb 19, 2024 8:22 pm Subject: Lookup() - number of CPU cycles to execute seems high at 40 |
small note : not all processors support movW. the DAT file contains MOVW=1 if the movw is supported.
lpm on older processors only support loading into R0. later processors have the instructions to l ... |
Topic: Lookup() - number of CPU cycles to execute seems high at 40 |
albertsm
Replies: 3
Views: 363
|
Forum: BASCOM-AVR old unsupported versions Posted: Mon Feb 19, 2024 2:53 pm Subject: Lookup() - number of CPU cycles to execute seems high at 40 |
My first attemp to speed up things would be eliminating all calculations by using a precalculated table.
In your case I would go with an DWord-Table that contains the complete 32Bit you want to sen ... |
Topic: Lookup() - number of CPU cycles to execute seems high at 40 |
albertsm
Replies: 27
Views: 1291
|
Forum: BASCOM-AVR Posted: Mon Feb 19, 2024 2:48 pm Subject: Lookup() - number of CPU cycles to execute seems high at 40 |
i explain how lookup works. for your micro that is.
- the address is needed for the start of the table. either in flash or ram. that requires 2 LDI instructions.
- an offset need to be added so in ... |
|