Blame
|
1 | # Machine Library |
||||||
| 2 | ||||||||
| 3 | I've created a library targeting the hardware specific aspects of programming the Sbc-3. I believe that it should work with the other boards from [Mega Micros](https://mega-micros.co.uk/index.htm), but since I don't have access to anything but the Sbc-3, can't confirm that. |
|||||||
| 4 | ||||||||
| 5 | To use the library, just include the following in your C sourcecode: |
|||||||
| 6 | ```c |
|||||||
| 7 | #include <machine.h> |
|||||||
| 8 | ``` |
|||||||
|
9 | |||||||
| 10 | ## Serial I/O |
|||||||
| 11 | ||||||||
| 12 | ## LED Control |
|||||||
| 13 | There's a block of 10 leds (LD7 on the SBC3-b3), and six of them can be used for anything you like. Led1 is furthest from the cpu: |
|||||||
|
14 | |||||||
|
15 | | LED # | Used for | |
||||||
| 16 | |:------|:---------| |
|||||||
| 17 | | 1 | Indicates that the board is being powered via an external 5v supply. | |
|||||||
| 18 | | 2 | Indicated that the board is being powered via the ATX power connector. | |
|||||||
| 19 | | 3 | Connected to the ~RTS pin on the duart channel B. | |
|||||||
| 20 | | 4 | Connected to the ~RTS pin on the duart channel A. | |
|||||||
| 21 | | 5 | Available to user. | |
|||||||
| 22 | | 6 | Available to user. | |
|||||||
| 23 | | 7 | Available to user. | |
|||||||
| 24 | | 8 | Available to user. | |
|||||||
| 25 | | 9 | Available to user. | |
|||||||
| 26 | | 10 | Available to user. | |
|||||||