Author |
Message |
Topic: Lookup() - number of CPU cycles to execute seems high at 40 |
i.dobson
Replies: 27
Views: 886
|
Forum: BASCOM-AVR Posted: Tue Feb 20, 2024 8:20 pm Subject: Lookup() - number of CPU cycles to execute seems high at 40 |
!LDS R30, {FlAddr} ' 2
!LDS R31, {FlAddr +1} ' 2
!LPM R18, Z+ ' 3
!LPM R19, Z ' 3
!STS {Rslt}, R18 ' 2
!STS {Rslt +1}, R19 ' 2
' 14 cycles
Is there a way of defining where the ... |
Topic: Passing Data from the bootloader to the main program |
i.dobson
Replies: 6
Views: 433
|
Forum: BASCOM-AVR Posted: Wed Jan 31, 2024 7:11 pm Subject: Passing Data from the bootloader to the main program |
Hi,
I had to do something simular for a project, and ended up writing a small routine looking at the flash memory.
In my case the bootloader version always started with "Boot VER " then the versio ... |
Topic: RC5 transmitting as a background process |
i.dobson
Replies: 15
Views: 952
|
Forum: Share your working BASCOM-AVR code here Posted: Thu Jan 25, 2024 8:18 pm Subject: RC5 transmitting as a background process |
Hi laborratte,
I wouldn't say pushing/poping register by hand when using nosaveis a nogo, you just need to include a big fat warning that the code was compiled/tested with version XXX and if the ve ... |
Topic: RC5 transmitting as a background process |
i.dobson
Replies: 15
Views: 952
|
Forum: Share your working BASCOM-AVR code here Posted: Thu Jan 25, 2024 6:55 pm Subject: RC5 transmitting as a background process |
Hi,
As mark said you should also save sreg, thats the "status register" that holds various status bits (Two’s Complement Overflow Flag, Negative Flag, Carry Flag etc.) from various arithmetic or lo ... |
Topic: UART input and line termination. |
i.dobson
Replies: 6
Views: 741
|
Forum: BASCOM-AVR Posted: Sat Jan 20, 2024 8:33 am Subject: UART input and line termination. |
Hi,
Use the inkey command to read the serial data character for character and the serial input buffering. Something like:-
Dim Rfid_char As Byte
Dim Rfid_array_local(15) As Byte
Dim ... |
Topic: PORTC PINS Dont respond to inputs |
i.dobson
Replies: 6
Views: 1630
|
Forum: BASCOM-AVR old unsupported versions Posted: Sun Sep 17, 2023 7:02 am Subject: PORTC PINS Dont respond to inputs |
Hi,
If you want to read the actual state of the pin (as an input) you must use pinc.0.
PORTx.y is the state of the output buffer
PINx.y is the actual state of the pin (high or low)
Regards
... |
Topic: Unable to get DRV2605L working |
i.dobson
Replies: 8
Views: 5491
|
Forum: BASCOM-ARDUINO Posted: Mon Mar 13, 2023 8:55 am Subject: Unable to get DRV2605L working |
Hi,
I would recommend that you use external pullups for all i2c buses, rather than trying to use the AVR's internal pullups.
Regards
Ian Dobson |
Topic: Unable to get DRV2605L working |
i.dobson
Replies: 8
Views: 5491
|
Forum: BASCOM-ARDUINO Posted: Mon Mar 13, 2023 8:49 am Subject: Unable to get DRV2605L working |
Hi,
Let first check that the i2c bus between the AVR and the TCA9548A actually works with a simple i2c scanner. I hope you have a working serial port
AVR and the TCA9548A bus only
Print , ... |
Topic: Unable to get DRV2605L working |
i.dobson
Replies: 8
Views: 5491
|
Forum: BASCOM-ARDUINO Posted: Sun Mar 12, 2023 10:53 pm Subject: Unable to get DRV2605L working |
Hi,
I think you need to split the i2c bus selection and attempting to connect to the slave (DRV2605L) into 2 seperate i2c commends. I've used a Pca9546 on a project and had to program in AVR that w ... |
Topic: I2C scanner not working |
i.dobson
Replies: 5
Views: 1290
|
Forum: BASCOM-AVR Posted: Sun Mar 12, 2023 9:01 am Subject: I2C scanner not working |
Hi,
If you had described the system setup better in your first post, it would be much easier to help you.
So the LCD is connected per i2c. If a i2c device is seen, the uC tries to send the addre ... |
Topic: I2C scanner not working |
i.dobson
Replies: 5
Views: 1290
|
Forum: BASCOM-AVR Posted: Sat Mar 11, 2023 7:35 am Subject: I2C scanner not working |
Hi,
Please post the whole code, rather than just a snippet. The code that you posted looks OK, so I imagine the problem is with the CPU setup (I/O, stack etc).
Regards
Ian Dobson |
Topic: NRF24L01 modules for RC arduino to bascom transfer |
i.dobson
Replies: 5
Views: 4402
|
Forum: BASCOM-ARDUINO Posted: Thu Oct 27, 2022 7:28 pm Subject: NRF24L01 modules for RC arduino to bascom transfer |
Hi,
OK the project was actually from 2014, wow time flies.
I've attected to code that I've got. From what I can remember I had 2 PCB's one as sender the other as reciever. Unfortunatly I can't r ... |
Topic: NRF24L01 modules for RC arduino to bascom transfer |
i.dobson
Replies: 5
Views: 4402
|
Forum: BASCOM-ARDUINO Posted: Wed Oct 26, 2022 5:59 pm Subject: NRF24L01 modules for RC arduino to bascom transfer |
Hi,
Several years ago I started a project using a HopeRF73 (NRF24L01 based I Think), which I never finished.
Once I get home I'll dig into my archive and see what code I can find.
Regards
Ian ... |
Topic: Serial ports and $Timout Command |
i.dobson
Replies: 8
Views: 1660
|
Forum: BASCOM-AVR Posted: Fri Jul 29, 2022 2:24 pm Subject: Serial ports and $Timout Command |
Hi,
Why not use Buffered serial input with Ischarwaiting and inkey?
If Ischarwaiting(#1) = 1 Then
Zigbee_input = Inkey(#1) 'get characte ... |
Topic: Xtiny212 and power modes |
i.dobson
Replies: 12
Views: 3763
|
Forum: BASCOM-AVR XTINY/MEGAX/AVRX Posted: Thu Jul 21, 2022 6:45 pm Subject: Xtiny212 and power modes |
Hi,
Maybe you need to configure your I/Os so that they're not floating. Try setting all pins to input and enablng the pullups.
Have a look here https://www.reddit.com/r/arduino/comments/ncfia7/a ... |
|