Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Question about RC5 without getRC5 "2083 ENHANCED"

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

Bascom Member



Joined: 25 Mar 2019
Posts: 5

PostPosted: Sat Mar 20, 2021 6:22 pm    Post subject: Question about RC5 without getRC5 "2083 ENHANCED" Reply with quote

Good day!

I try to run RC5 in background like metioned here: https://avrhelp.mcselec.com/index.html?config_rc5.htm
In all attempts I get error messages.
The messages always point to the RC5 lib.
However, it says in this lib that it would be suitable for this.
The problem persists even after an update to version 2083.

On the page mentioned above it is noted in red: 2083 ENHANCED

Does anyone know a remedy for the problem or can tell me where I can get the right lib if this is the cause?

Error message:

Error : 1 Line : 13 Unknown statement [.EQU not found for:TIFR1] , in File : C:\MCS\BASCAVR2083\LIB\RC5.LIB
Error : 387 Line : 13 IO address must be in range [0-31] [TIFR1] , in File : C:\MCS\BASCAVR2083\LIB\RC5.LIB
Error : 1 Line : 42 Unknown statement [.EQU not found for:TIFR1] , in File : C:\MCS\BASCAVR2083\LIB\RC5.LIB
Error : 387 Line : 42 IO address must be in range [0-31] [TIFR1] , in File : C:\MCS\BASCAVR2083\LIB\RC5.LIB

Code is like in the example.

Best regards
Andy

(BASCOM-AVR version : 2.0.8.3 )
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Sat Mar 20, 2021 7:39 pm    Post subject: Re: Question about RC5 without getRC5 "2083 ENHANCED&qu Reply with quote

nanocamp wrote:
Good day!]Code is like in the example.

Completely identical, including type of controller?
Back to top
View user's profile
nanocamp

Bascom Member



Joined: 25 Mar 2019
Posts: 5

PostPosted: Sat Mar 20, 2021 8:17 pm    Post subject: solved Reply with quote

testet with 8, 88, 328P

It works regardless of the error messages, the HEX is compiled.

It is only mandatory to use the PB.0 (ICP1) for the infrared receiver.

Thank you.
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 2262

blank.gif
PostPosted: Sun Mar 21, 2021 6:06 pm    Post subject: Re: solved Reply with quote

nanocamp wrote:
testet with 8, 88, 328P

Compiles with ATM88 & 328, not with ATM8.
Quote:
It works regardless of the error messages,

It actually works or it actually compiles?
I have the same issue here, compiling for ATM8 the .hex is updated.
With ATM8 TIFR-errors are thrown and therefor no new hex should have been updated or created.
Quote:
It is only mandatory to use the PB.0 (ICP1) for the infrared receiver.

Is this a question or assertion?
If the first, the comment tells:
Quote:
...since input capture and overflow are used

An ICP-interrupt without using a capturing pin wouldn't make much sense.
Back to top
View user's profile
nanocamp

Bascom Member



Joined: 25 Mar 2019
Posts: 5

PostPosted: Sun Mar 21, 2021 7:01 pm    Post subject: Re: solved Reply with quote

Quote:
It actually works or it actually compiles?
I have the same issue here, compiling for ATM8 the .hex is updated.
With ATM8 TIFR-errors are thrown and therefor no new hex should have been updated or created.


It compiles even with the error messages and it also works with atmega8 also.

Quote:
...since input capture and overflow are used
An ICP-interrupt without using a capturing pin wouldn't make much sense.


I discovered ...

But one problem remains, with this PD.0 and PD.1 is not usable.
- PD.0 used as output i measure on high only half the VDD
- PD.1 used as output is always high
all other inputs outputs works fine

Is it neccesary for this RC5 method to affect this pins?
Or is it possible to fix this by changing the lib?
Back to top
View user's profile
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 971

poland.gif
PostPosted: Sun Mar 21, 2021 9:06 pm    Post subject: Reply with quote

Any usage of Baud, Print etc. will set TXEN RXEN of USART and override PORT/PIN functions. Remove Baud and Print`s if not used.
If you only want print then PD.0 can be "released" by UCSRB.RXEN = 0 command.
Back to top
View user's profile Visit poster's website
nanocamp

Bascom Member



Joined: 25 Mar 2019
Posts: 5

PostPosted: Sun Mar 21, 2021 9:15 pm    Post subject: Reply with quote

EDC wrote:
Any usage of Baud, Print etc. will set TXEN RXEN of USART and override PORT/PIN functions. Remove Baud and Print`s if not used.
If you only want print then PD.0 can be "released" by UCSRB.RXEN = 0 command.


That it was.
Thank you very much!
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Sun Mar 21, 2021 9:29 pm    Post subject: Reply with quote

this error does not halt the assembler but it should.
since now it will use a value that is likely not the right one (-1)
the address for TIFR1 was not found since this chip does not have it.
you can add it in the dat file below the TIFR definiiton.

TIFR1 =$38 ; alias


without this i doubt the code will actually work. despite the fact that you get a bin/hex file.

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

Bascom Member



Joined: 25 Mar 2019
Posts: 5

PostPosted: Mon Mar 22, 2021 8:06 pm    Post subject: Reply with quote

albertsm wrote:
...


without this i doubt the code will actually work. despite the fact that you get a bin/hex file.


Yes it works, the Atmega is signed as:
Atmega8
16AU 1117D

It would be a really nice thing to have a toggle bit not only in the address byte but also in the command byte for each different command.
Is that somehow possible?
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