Miini2440 starts with the simplest led marquee

Source: Internet
Author: User

I just bought a mini2440 board and started to learn it slowly.

Start with the simplest led marquee.

First, view the data manual

 

 

The program is very simple, but it is modified in the routine as follows:

Void dely (u32 TT)
{
U32 I;
For (; tt> 0; TT --)
{
For (I = 0; I <10000; I ++ ){}
}
}

Int main (INT argc, char ** argv)
{
Int I;
U8 key;
U32 mpll_val = 0;
Int data;

Mpll_val = (92 <12) | (1 <4) | (1 );
 
Changempllvalue (mpll_val> 12) & 0xff, (mpll_val> 4) & 0x3f, mpll_val & 3 );
Changeclockdivider (Key, 12 );


Mmu_disableicache ();
Mmu_disabledcache ();

Rgpbcon = 0x155555;

I = 0;
Data = ~ 0x01;
While (1)
{

Rgpbdat = (Data <5 );
Dely (1, 120 );
Data = ~ (0x01 <I );
I ++;
If (I = 4)
I = 0;

}

Return 0;
}

 

The program is very simple, but it is also the first learning program.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.