Ic For Fun: Sony IR Remote |
Posted: 08 May 2012 09:33 AM PDT Circuit assembled on prototype board A routine and test application to send and receive data using the SIRCS (Sony infrared controller) protocol. Please note that this was my first venture into infrared remote control communications, and that the Infrared library and software is a lot more flexible and supports a much larger number of protocols. Features Features Send and receive data using the SIRCS protocol to control Sony devices via infrared. Sending Minimal hardware required (cheap single IR LED and optional resistor, depending on circuit) thanks to software modulation. Receiving Simple hardware thanks to cheap single-package IR module. Documentation and Limitations I haven’t found any formal documentation on the protocol, so the project was built using a number of sources of information as well as my own research and testing. Many thanks to the following: Revolution Education (PICAXE) — sample codes, circuit layouts and PICAXE-08M microcontroller (debugging). For testing purposes I have used a Sony RM-826 and Sony DVD/PlayStation remote control. The RM-826 (12-bit) can be configured to send to different devices; the PlayStation remote controller transmits 20-bit commands. I have not got access to any 15-bit remote control units. Components The hardware is easy enough to assemble. You can build either the transmitter, receiver, or both. For the transmitter, you need the following parts: The receiver is more complex, and requires the following parts: The circuit layout is as follows. Note that you omit either side of the design to suit your needs. It has been presented as a suggestion; check the datasheets for your parts and adjust the layout or ratings of components to suit. If you have already constructed a PS/2 adapter for your calculator, you can plug the components into that instead (viewed from the PS/2 socket): Software Protocol Each command is made up of two parts; a button press code and a device ID. The device ID is used to target a particular device (for example, to differentiate between sending a channel up command between a TV and a VCR). An added complication is that command words can be different lengths. The three I know of are 12-bit, 15-bit and 20-bit. The software routines return or take as inputs the three different parameters: You must reset any bits in parameters that are unused, otherwise the timing between writes will be incorrect. A single physical device can respond to multiple device IDs – a TV with Teletext support will respond to both TV and Teletext device IDs. See the appendices for some sample codes. Included is a piece of software that can be used to turn your TI-83+ series calculator into a programmable remote control. It uses a simple GUI that should hopefully be pretty self-expanatory. If you do not have any layout files installed, the software will prompt you to create one when you first start it. It cannot be used without a layout file. At the default screen you can carry out a number of actions: Device — Cycle through the different device layout files you have installed on your calculator. Press the softkey (F1 to F5) under each option to carry out its action. Pressing any of the other buttons on the calculator’s keypad will transmit the command you have associated with that particular key. The software uses its own text input routines. Press Alpha to cycle through input modes – uppercase, lowercase, numbers and special keys. Press Del to step backwards and correct mistakes, and press Enter to confirm. The input routines automatically correct you when you are entering text in a mode that the current field doesn’t support (for example; switch between numeric and uppercase modes when entering hexadecimal values). When the device you wish to edit is active, go into the Edit mode. You will need to press the key (on the calculator) that you wish to customise. Any key apart from the F1-F5 keys can be edited (even the On key)! You can then edit each of the three properties of the key – command word length, device code and command code – by moving the selection arrow up and down then pressing Enter to start editing. If the command word length is set to 0, the key is effectively disabled and all of the options disappear. You can still edit them, however. If you have built and attached the receiver to your calculator you can speed up data entry by simply pointing your remote control at it and pressing the button you want to associate with a key. It will be assigned automatically. I’ve bundled a few layout files with this release; I’m sure you’ll want to edit them to your own requirements but they can at least help to illustrate how the program works. There are three routines; one covers receiving data and the other two cover transmitting data. All three use the same register set for ease of use. The Read routine will read and decode a single command. If it times out, or an invalid number of bits were read, it clears Z and returns. For increased reliability, read multiple commands until two match. If you want a blocking version of the routine, poll the least significant bit of the link port status until it goes low and then call Read. To send a single command, use the Write routine. You should send data at 45mS intervals; to make this easier you can use the WriteMultiple routine that handles all the mucky timing for you. The Sony remote controls I have access to all seem to send data a minimum of 3 times for each button press. Waveform (Exact timings may vary slightly). The transmitter sends a series of carefully timed bursts of infrared light, modulated at 40kHz. Each command is made up of 12, 15 or 20 bits of data and one start bit. The timing is based around multiples of 0.6mS. There is a 0.6mS delay (‘silence’) between each bit. The start bit is 2.4mS long, a 0 bit is 0.6mS long and a 1 bit is 1.2mS long. The data is sent least significant bit first, and the command ID is sent before the device ID. If you look at the image above (produced by recording the output of the TI-83 Plus) you can clearly see there are ‘thin’, ‘fat’ and one ‘terminally obese’ burst corresponding to the timings above. The exact sequence looks to be S010010010000, which would make the control code %0010010 ($12) and the device ID %00001 ($01); that’s the volume up button for a TV. Each command should be sent at least three times, at intervals of 45mS. That’s 45mS overall; not a 45mS delay between commands – the start bit of the second command should be transmitted 45mS after the start bit for the first was transmitted. This makes timing rather more interesting (as commands are different lengths depending on how many bits were sent) but can be easily worked around by counting set bits afterwards and working out how much to pad the command with silence so that they’re always the same length. The PlayStation 2 remote controller is an interesting one – it generates two different device IDs depending on whether you are pressing a DVD-player related button or one of the PS2-related buttons. There are four buttons on the controller that apply to both modes – the up, down, left and right buttons – and the controller sends out alternating DVD and PS2 codes for these buttons. By truncating the PS2 DVD remote controller’s device ID down to 5 bits you get $1A, which is the usual code for a DVD player. I cannot vouch for most of these command IDs, so best to check against a real remote control before using them. No related posts. This posting includes an audio/video/photo media file: Download Now |
PS/2 with TI-83 Plus series calculator Posted: 08 May 2012 09:07 AM PDT his is a project to interface AT and PS/2 protocol peripherals (keyboard and mouse) to the TI-83 Plus series calculator. VideosThe following video clips were recorded using the latest demo. Each is under a megabyte and is a WMV file.
DownloadsThe following are listed in reverse date order, newest releases first.
Other Images
No related posts. |
2 game in 1 : Tetris and Snake with one AVR Posted: 08 May 2012 08:58 AM PDT This project allows you to play two games – Tetris and Snake – on a PAL TV using a very simple circuit based around an ATmega168. Martin Šustek has modified the project to also include a Sokoban game. Some information about his version can be found dotted throughout this page; for full details, please visit his website (Czech). DownloadsThe original source code and binary can be downloaded from this link. Game Videos
Either game can be selected with a menu that appears when you power up the circuit. Tetris was developed first, and so doesn’t show this menu in the following video. Photos
No related posts. This posting includes an audio/video/photo media file: Download Now |
You are subscribed to email updates from WORLD OF ELECTRO To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |