Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:55 11 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Problem with CSUB NECSend

Author Message
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 979
Posted: 10:35am 02 May 2018
Copy link to clipboard 
Print this post

Hi,

I have the problem that I have to find out from a monitor the device address and the code of which I do not have a remote control.
Probably the monitor uses the NEC code...
It would be easiest to send all sorts of addresses and codes and wait for the monitor to turn on.

And now my problem:
I use this C-Function from Peter - it works very well! But...
When I try to use variables for device and code instead of constants for "NECSend pin_number, device, code" the CSUB fails! It sends always the same (garbage). It seems that this function doesn't work with variables!

Is there a way to use this function with variables so that I can program a loop to send all possibilities?

Thanks!

Frank
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10570
Posted: 10:55am 02 May 2018
Copy link to clipboard 
Print this post

I suspect you are using floating point variables. They must be integers.
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 979
Posted: 11:44am 02 May 2018
Copy link to clipboard 
Print this post

Hi Peter,

thank you so very much! "DIM INTEGER device, code" do the trick!!!
...and I found out the correct codes for my monitor!!!

Frank
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025