USBAsp v 2.0 firmware for flashing AT89S51, AT89S52

main.hex firmware with an inversion of RESET pin:

https://drive.google.com/file/d/1QiRvCN29H0l-Kq0eJhdKs3WfHdrvEXrB/view?usp=sharing

source code:

https://drive.google.com/file/d/1-idzOalAeA77U9Ony_UZ1YfTT4d_M8j3/view?usp=sharing

avrdude.conf

https://drive.google.com/file/d/1bEraBArDpIUMMW7dt0KzH7qNNhkQd99W/view?usp=sharing

TARGET=atmega8

HFUSE=0xd9

LFUSE=0x9f
You can just flash the MCU without fuses

env for PlatformIO

[env:AT89S51]

platform = intel_mcs51

board = AT89S51

upload_protocol = custom

upload_command = sudo avrdude -c usbasp -p at89s51 -U flash:w:$SOURCE:i -C +./avrdude.conf

Controlling Vivitek projector via Arduino Part 1 (decoding)

I has situation when 3 Vivitek’s RC remote controls doesn’t work. So I decided to make my own IR remote control.

Remote uses NEC protocol. Arduino uses IRremote library. I have wired TSOP receiver to the Arduino and dumped some codes.

Here are the commands:

Power on/off

Protocol=NEC Address=0x31 Command=0x81 Repeat gap=94450us

Protocol=NEC Address=0x31 Command=0x81 Repeat gap=94500us

Menu

Protocol=NEC Address=0x31 Command=0x87 Repeat gap=94450us

Protocol=NEC Address=0x31 Command=0x87 Repeat gap=94500us

Up

Protocol=NEC Address=0x31 Command=0xC1 Repeat gap=94450us

Protocol=NEC Address=0x31 Command=0xC1 Repeat gap=94400us

Down

Protocol=NEC Address=0x31 Command=0xC2 Repeat gap=94450us

Protocol=NEC Address=0x31 Command=0xC2 Repeat gap=94450us

Left

Protocol=NEC Address=0x31 Command=0xC3 Repeat gap=94450us

Protocol=NEC Address=0x31 Command=0xC3 Repeat gap=94450us

Right

Protocol=NEC Address=0x31 Command=0xC4 Repeat gap=94450us

Protocol=NEC Address=0x31 Command=0xC4 Repeat gap=94450us

Enter (Ok)

Protocol=NEC Address=0x31 Command=0xC5 Repeat gap=94500us

Protocol=NEC Address=0x31 Command=0xC5 Repeat gap=94500us

Keystone 1

Protocol=NEC Address=0x31 Command=0x85 Repeat gap=94450us

Protocol=NEC Address=0x31 Command=0x85 Repeat gap=94500us

Keystone 2

Protocol=NEC Address=0x31 Command=0x84 Repeat gap=94450us

Protocol=NEC Address=0x31 Command=0x84 Repeat gap=94400us

Source

Protocol=NEC Address=0x31 Command=0x83 Repeat gap=94450us

Protocol=NEC Address=0x31 Command=0x83 Repeat gap=94450us

Auto

Protocol=NEC Address=0x31 Command=0x86 Repeat gap=94500us

Protocol=NEC Address=0x31 Command=0x86 Repeat gap=94500us

Mute

Protocol=NEC Address=0x31 Command=0x89 Repeat gap=94500us

Protocol=NEC Address=0x31 Command=0x89 Repeat gap=94450us

Freeze

Protocol=NEC Address=0x31 Command=0x8E Repeat gap=94450us

Protocol=NEC Address=0x31 Command=0x8E Repeat gap=94500us

Plus

Protocol=NEC Address=0x31 Command=0x8C Repeat gap=94450us

Protocol=NEC Address=0x31 Command=0x8C Repeat gap=94450us

Minus

Protocol=NEC Address=0x31 Command=0x8F Repeat gap=94450us

Protocol=NEC Address=0x31 Command=0x8F Repeat gap=94450us

Watch for other parts…to be continued