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 : PicoMite MMBasic- IRSEND missing or I am missing something, Plse help?
Author | Message | ||||
EverLearning Newbie Joined: 15/05/2022 Location: United StatesPosts: 3 |
PicoMite newbie here :-). Having fun but ran into a problem trying to use IRSEND. It looks like (despite the manual) that the command is missing / not actually implemented?!? Running: PicoMite MMBasic Version 5.07.04 'send IR code SetPin gp19, dout Dim integer DevCode, KeyCode DevCode = 255 Keycode = 90 Print DevCode, Keycode IRSEND gp19, DevCode, KeyCode End > run 255 90 [11] IRSEND gp19, DevCode, KeyCode Error : Unknown command > Tried various versions of that, but it seems that just IRSEND results in the same error. The IR receive example from the manual runs correctly, fwiw.. Three days of combing the web looking for answers ;-). Perhaps I am the only one trying to use IRSEND? Any help, suggestions or pointers GREATLY appreciated! Thanks, Vic. |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3649 |
I only had a quick look, but the code seems to want IR SEND rather than IRSEND (Also IR CLOSE not IRCLOSE. And so on.) edit: the manual appears to say the same... John Edited 2022-05-15 22:45 by JohnS |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 1773 |
It appears the version of IR implemented on the PicoMite is different to the manual. Typing LIST COMMANDS shows IR but not IRSEND. Tried IR SEND gp0, 25, 90 and that doesn't give an error, so I assume it works. Don't use SETPIN as IR does that automatically. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8567 |
The manual is correct "IR SEND" |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 1773 |
The manual that came with the latest version has IRSEND. One word not two. Edit Just downloaded another copy of the manual and it is the same. Cleared cache first. Checked some older versions. They are all the same. Edited 2022-05-15 23:20 by phil99 |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8567 |
The command listing in both cases is correct. The "special devices" section needs updating |
||||
EverLearning Newbie Joined: 15/05/2022 Location: United StatesPosts: 3 |
THANKS Folks, that works :-). IR detector shows (as does the scope) that we are getting what appears to proper pulses :-). MUCH APPRECIATED! Of course, now I feel like an idiot as that is the only thing that I didn't try :-) LOL. And yes, the 05 and 07 manuals that I have both say IRSEND. Also, FWIW, I used SETPIN and that doesn't appear to affect the IR SEND command. Just commented that out and it still works :-). Again, THANKS! Vic. |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
The manuals in the download have been updated. They are now at Rev 3. Geoff Geoff Graham - http://geoffg.net |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 1773 |
Another minor item for Rev 4. VGA manual Page 10 pin diagram "VGA Blue Output" and "VGA 1/2 green Output" transposed. |
||||
EverLearning Newbie Joined: 15/05/2022 Location: United StatesPosts: 3 |
Just an update here. Not sure this is going to work for me. None of the remotes that I have seem to work with IR SEND. The IR receive manages to capture the codes, but IR SEND has limits :-). Some examples from the remotes I want to emulate with the pico: ' comments added otherwise the capture (Received) is the example out of the manual and the IR SEND is hacked in by me in the interrupt routine :-). Extract from the code for reference: ... SetPin gp6, IR ... Dim integer DevCode, KeyCode ' variables used by decoder IR DevCode, KeyCode, IRInt ' start ir decoder ... Sub IRInt Print "Received device = " DevCode " key = " KeyCode IR Send gp18, DevCode, Keycode ' My addition to example. End Sub Error issues: Received device = 8415 key = 16 ' Vizio device is 8415 (power key) [31] IR Send gp18, DevCode, Keycode Error : 8415 is invalid (valid is 0 to 31) Received device = 128 key = 152 [31] IR Send gp18, DevCode, Keycode Error : 128 is invalid (valid is 0 to 31) ' iview device (128) power key (152) Received device = 16 key = 149 [31] IR Send gp18, DevCode, Keycode Error : 149 is invalid (valid is 0 to 127) ' 152 is sony remote power key I am a bit confused, it would seem that whatever receive gets should be sendable by SEND? Or am I doing something wrong / missed something ? Comments, suggestions, pointers GREATLY appreciated :-)! Thanks, Vic. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8567 |
Don't put the IR SEND in the interrupt routine. This will cause problems as the receive interrupt can't trigger normally because the send is blocking the interrupt |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 1773 |
IR SEND appears to be limited to:- IR Send pin(x), 31, 127 Codes greater than those can't be sent at all. The BITBANG BITSTREAM command would be one way to send any bit sequence. Use a diode / resistor AND gate to mix that with a 38kHz PWM square wave from another pin. To get the original bit sequence you could possibly use Peters CSUB LOG to capture the output of the IR receiver. Or find the transmission protocol on the net and create your sequence from that. You could eliminate the need for the AND gate by replacing the bit pulses in the bitstream with the required number of 13uS pulses and 13uS pauses to produce the complete 38kHz modulated signal on one pin. Edited 2022-05-17 10:05 by phil99 |
||||
Print this page |