NEC remote control format - Page 1
Forum section: electronics / projects

author: cncjerry
author_rank: Unknown
timestamp: August 10, 2025, 01:09:24 am
content: Hello,I have a tape deck that uses what it calls NEC format in a wired remote control. I can't find a remote anywhere. The service manual lists the control code as 8371 H (0x8371, I assume). It then has a table of keys and hex codes. For instance the STOP key is 0x58. I found some limited doc that states you send the control code followed by the keycode, but that doc used on two bytes, and with a two-byte control code + command code, that is three... Anyway, I wired up an arduino according to the service manual notes using a 3.5mm barrel connector with the ring as the control, band as ground, and the tip receives 3v from the deck that I don't use. I'm using software serial on the arduino and the data is getting to the unit. I've tried all baud rates but it seems like 9600,8,n,1 is common. I've tried both normal an inverted signals, all without luck. I'm not modulating the signal with 38Khz as would be done with I/R controls. Wondering if anyone has any ideas before I switch to another control system that is very limited. There is a db15 connector that you can ground for play, stop, record, rewind and fast forward but I really want the full remote codes, primarily for skipping tracks and numerical input. Hey, I'm a tapehead!Jerry

author: cncjerry
author_rank: Unknown
timestamp: August 10, 2025, 01:58:02 am
content: I found a lot more information on the NEC IR protocol and I'll need an Arduino library. It's clearly more than bit-banging a serial code to the receiver, even though the receiver in this case is not I/R but a wired link, I suspect it follows the same encoding. So zeros and ones have a time delta encoding, sort of like PCM. But what I do without, or maybe I need the 38khz signal too, takes this out of the realm of an afternoon project.ThanksJerry

author: moffy
author_rank: Super Contributor
timestamp: August 10, 2025, 03:06:07 am
content: The time delta is a pretty common feature of IR remotes, look for 'universal remote code', last time I looked they covered quite a range of different manufacturer protocols.e.g.https://www.arduinolibraries.info/libraries/i-rremote

author: cncjerry
author_rank: Unknown
timestamp: August 10, 2025, 05:09:12 pm
content: Thanks for the reply, Moffy. WRT the arduino library, I did some more digging. It supports a dozen or so formats. I have to scope it today to see if the arduino is adding the 38k modulation in that library or if an external oscillator would be needed. I suspect the latter. I have to use the correct routine as NEC uses a few different formats. They have a raw format too that I'll try again.I scoped another deck's remote (same manufacturer, TASCAM). It uses another format instead of NEC. But they expect on that box for the wired remote to have the 38K modulation. They provide instructions on how to bypass it internally, if you want to do what I am trying, to use TTL levels without the modulation. On that deck and the one I am trying, there is another connector that takes serial input bypassing the 38K demod, so why they would suggest this, I don't know. I tried the arduino input into the wired remote port, but didn't try into the serial input. So there is some screwing around to do before I call it quits on this project.I have 35 digital tape decks that I've restored and this one is my mastering deck. All the other decks get aligned to it and I create test tapes on it. I enjoy repairing them as they could be very, very difficult to fix. I often need to mold gears, 3D print parts, machine things, etc. The electronics problems can be difficult, but most are just leaky caps. Contrary to belief, you can still get parts from TEAC and TASCAM, not so for Sony, but many are interchangeable.Jerry

author: cncjerry
author_rank: Unknown
timestamp: August 11, 2025, 12:27:26 am
content: Sometimes I even amaze myself! First, I had to find the correct arduino processor as all I tried didn't work, except for an ancient Arduino uno. The Service manual for this deck had the NEC remote 'custom code' (code that IDs the remote) in standard format (e.g. 0x8371). For some reason, the irremote library I am using with an Arduino UNO, sends the LSB first, so when you read each byte on the scope in binary, it comes across reversed. This I can deal with, but it also flipped the bytes in the custom code. So instead of 0x8371, after reversing the binary, it read as 0x7183 on the scope. It also does the same for the command, but as it is only one byte, 0x59 is read on the scope as b1001 1010. 0x59 would be 0101 1001. Anyway, switching the bytes in the custom code fixed it.30yrs ago, though I worked with electronics, RF mostly, I made a custom IR distribution setup for my home. Back then digital scopes were expensive, so I bought a PCI32, I think it was called, I still have it, but it was a very limited digital scope. I just hit 30yrs in this house on August 8th, I still use part of the IR setup, switched to Xantec for the higher end switching, but it seems like I came full circle today.Now that I think about it, I could use an Arduino IOT device and send to it wirelessly from a phone app...Jerry

author: moffy
author_rank: Super Contributor
timestamp: August 11, 2025, 12:35:06 am
content: Congrats, a lot to be said for perseverance.