Copy Link
Add to Bookmark
Report

The PIC16L

xbox's profile picture
Published in 
xbox
 · 10 months ago

written by Michael Steil, 26 June 2002

Little is known about how to program the PIC. Basically, the PIC is an independent 16 bit microprocessor with its own RAM and I/O lines, connected to the CPU through the SMBus. Its own firmware makes it possible for the PIC to be talked to on a very high level. Flashing of the LED, for instance, is completely controlled by the PIC.

Command overview

Reading:

CommandDescription
00
04
06
0F
10
28
3B
50
63
CB

Writing:

CommandDescription
01
02sent with data = 1 just before kernel panic
03
04
07Start new LED flashing (data = 1)
08Set LED flashing sequence
0B
0C
0D
0ESent by Xbox kernel with data = 2, 5 or 6 before setting LED flashing sequence
11
12
13
19Possible data: 0 or 1; sent by Xbox kernel with value = 0 to disable reset on eject
1A
1B
1C
1D
1E
1F
20
21

The LED

The PIC has its own timer to flash the LED: The LED color goes through four phases, 0 to 3. In each phase, the color of the LED can be different. The LED can bei either off, red, green, or (by turning on red and green) orange. All the CPU has to do to make the PIC control the LED in a specified way is to transmit a byte containing the color sequence to it.

Every phase consists of two bits for each red and green, so four phases fit into a byte. Thus the control byte looks as follows:

Bit #Description
7Red (Phase 0)
6Red (Phase 1)
5Red (Phase 2)
4Red (Phase 3)
3Green (Phase 0)
2Green (Phase 1)
1Green (Phase 2)
0Green (Phase 3)

To set an LED code, the command code "8" and the LED code as data has to be sent to the I2C device 0x20, followed by the command code "7" with a "1" as data, both in byte mode.

SMBusWriteCommand(0x20, 8, false, states); 
SMBusWriteCommand(0x20, 7, false, 1);

These are some examples for possible values:

CodeDescription
0x00Off
0xf0Permanent red
0x0fPermanent green
0xffPermanent orange
0xc0Slow red flashing
0xa0Fast red flashing
0x63Off - red - orange - green flashing

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT