Merge pull request #27 from mithro/master

Adding more info about the ID value.
This commit is contained in:
Tim Ansell 2019-08-22 15:22:10 +02:00 committed by GitHub
commit cdec332312
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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.