Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- liangzhen
- Date:
- 2012-05-02
- Revision:
- 0:c928c2d8bd02
- Child:
- 1:acf14b6dd1be
File content as of revision 0:c928c2d8bd02:
#include "power_up.h"
#include "scan.h"
using namespace std;
DigitalOut RESET (p21);
Serial s(USBTX, USBRX);
int main() {
s.printf("DDRO_software starts ...\r\n");
s.printf("powerReset() ...\r\n");
//reset
powerReset();
s.printf("powerUp() ...\r\n");
//power up
powerUp();
PLL clk;
s.printf("testPLL() ...\r\n");
RESET = 0;
wait(1);
RESET = 1;
for (int i=125;i<160;i+=5)
{
clk.setPLL(i);
double out=(double)5000*(double)i/1024;
s.printf("Setting PLL, output should be %e k\n", out);
wait(5);
}
s.printf("powerDown() ...\r\n");
//power down
powerDown();
s.printf("DDRO_software ends.\r\n");
}