URL
https://opencores.org/ocsvn/light8080/light8080/trunk
[/] [light8080/] [trunk/] [c/] [hello.c] - Diff between revs 66 and 67
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 66 |
Rev 67 |
Line 130... |
Line 130... |
// program main routine
|
// program main routine
|
main()
|
main()
|
{
|
{
|
// configure UART baud rate - set to 9600 for 30MHz clock
|
// configure UART baud rate - set to 9600 for 30MHz clock
|
// BAUD = round(<clock>/<baud rate>/16) = round(30e6/9600/16) = 195
|
// BAUD = round(<clock>/<baud rate>/16) = round(30e6/9600/16) = 195
|
//MOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTI
|
// Note: Usage of a minimum divider value of 1 will accelerate the RTL simulation.
|
//MOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTI
|
UBAUDL = 195;
|
// UBAUDL = 195;
|
|
UBAUDL = 1;
|
|
//MOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTI
|
|
//MOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTIMOTI
|
|
UBAUDH = 0;
|
UBAUDH = 0;
|
|
|
// configure both ports to output and digital outputs as zeros
|
// configure both ports to output and digital outputs as zeros
|
P1DATA = 0x00;
|
P1DATA = 0x00;
|
P1DIR = 0xff;
|
P1DIR = 0xff;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.