Adding more info about the ID value.

This commit is contained in:
Tim 'mithro' Ansell 2019-08-22 15:19:45 +02:00
parent e4204862eb
commit ebf19b4345

View file

@ -311,14 +311,22 @@ These are special areas of memory that don't really exist. Instead, they corres
>>>
```
The `CSR_VERSION_MODEL_ADDR` contains a single character that indicates what version of the hardware you have. We can convert this to a character and print it out. For a Production PVT Fomu, you might see this:
The `CSR_VERSION_MODEL_ADDR` contains a single character that indicates what version of the hardware you have. We can convert this to a character and print it out.
If you have a production board you will get `P` as shown below;
```python
>>> chr(machine.mem32[0xe0007028])
'P'
>>>
```
If you have a hacker board you will get `H` as shown below;
```python
>>> chr(machine.mem32[0xe0007028])
'H'
>>>
```
### Memory-mapped RGB driver
The blinking LED is actually a hardware block from Lattice. It has control registers, and we can modify these registers by writing to memory in Fomu. Some of these registers control things such as the timing of the fade in and fade out pulses, and some control the level of each of the three colors.