<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://elinux.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://elinux.org/index.php?title=JuiceBox_Code_Test_Main&amp;feed=atom&amp;action=history</id>
		<title>JuiceBox Code Test Main - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://elinux.org/index.php?title=JuiceBox_Code_Test_Main&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=JuiceBox_Code_Test_Main&amp;action=history"/>
		<updated>2013-05-23T12:01:40Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.21alpha</generator>

	<entry>
		<id>http://elinux.org/index.php?title=JuiceBox_Code_Test_Main&amp;diff=3767&amp;oldid=prev</id>
		<title>Chris at 09:01, 14 July 2007</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=JuiceBox_Code_Test_Main&amp;diff=3767&amp;oldid=prev"/>
				<updated>2007-07-14T09:01:11Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 09:01, 14 July 2007&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;/* file: test_1.c */&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;/* file: test_1.c */&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 82:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 81:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category:JuiceBox]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key elinux:diff:version:1.11a:oldid:2208:newid:3767 --&gt;
&lt;/table&gt;</summary>
		<author><name>Chris</name></author>	</entry>

	<entry>
		<id>http://elinux.org/index.php?title=JuiceBox_Code_Test_Main&amp;diff=2208&amp;oldid=prev</id>
		<title>RBot: Bot (Edward's framework)</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=JuiceBox_Code_Test_Main&amp;diff=2208&amp;oldid=prev"/>
				<updated>2007-03-07T03:32:17Z</updated>
		
		<summary type="html">&lt;p&gt;Bot (Edward&amp;#039;s framework)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* file: test_1.c */&lt;br /&gt;
/* Some CPU register constants */&lt;br /&gt;
unsigned long int * const control_e=(unsigned long int*)0x01D20028;&lt;br /&gt;
unsigned long int * const port_e=(unsigned long int*)0x01D2002c;&lt;br /&gt;
unsigned long int * const ulcon0=(unsigned long int*)0x01D00000;&lt;br /&gt;
unsigned long int * const ucon0=(unsigned long int*)0x01D00004;&lt;br /&gt;
unsigned long int * const ufcon0=(unsigned long int*)0x01D00008;&lt;br /&gt;
unsigned long int * const umcon0=(unsigned long int*)0x01D0000c;&lt;br /&gt;
unsigned long int * const utrstat0=(unsigned long int*)0x01D00010;&lt;br /&gt;
unsigned long int * const uerstat0=(unsigned long int*)0x01D00014;&lt;br /&gt;
unsigned long int * const ufstat0=(unsigned long int*)0x01D00018;&lt;br /&gt;
unsigned char * const utxh0=(unsigned char*)0x01D00020;&lt;br /&gt;
unsigned long int * const urxh0=(unsigned long int*)0x01D00024;&lt;br /&gt;
unsigned long int * const ubrdiv0=(unsigned long int*)0x01D00028;&lt;br /&gt;
unsigned long int * const tcmpb1=(unsigned long int*)0x01D5001c;&lt;br /&gt;
&lt;br /&gt;
void uart_init()&lt;br /&gt;
{&lt;br /&gt;
    /* Assign TX and RX pins to the UART */&lt;br /&gt;
    *control_e&amp;amp;=~0x0c;&lt;br /&gt;
    *control_e|=0x08;&lt;br /&gt;
&lt;br /&gt;
    /* 8 bits, 2 stop bits, no parity, non-IrDA mode */&lt;br /&gt;
    *ulcon0=0x03;&lt;br /&gt;
&lt;br /&gt;
    /* Polled RX, polled TX, no break, no loopback, no error interrupts, &lt;br /&gt;
        no RX fifo timeouts, TX level interrupts */&lt;br /&gt;
    *ucon0=0x205;&lt;br /&gt;
&lt;br /&gt;
    /* Clear and enable FIFOs */&lt;br /&gt;
    *ufcon0=7;&lt;br /&gt;
&lt;br /&gt;
    /* Disable automatic flow control on handshake lines */&lt;br /&gt;
    *umcon0=0;&lt;br /&gt;
&lt;br /&gt;
    /* Set baud rate divisor&lt;br /&gt;
        0x20 = 115.2k baud, JB demo app running&lt;br /&gt;
        0x23 = 115.2k baud, MP3 player app running&lt;br /&gt;
&lt;br /&gt;
        The demo app and the MP3 app set the CPU clock to &lt;br /&gt;
        different frequencies! */&lt;br /&gt;
    *ubrdiv0=0x20;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void uart_tx_byte(unsigned int i)&lt;br /&gt;
{&lt;br /&gt;
    unsigned char c=*(unsigned char*)i;&lt;br /&gt;
&lt;br /&gt;
    /* Spin until TX FIFO isn't full */&lt;br /&gt;
    while ((*ufstat0 &amp;amp; 0x0200)) {};&lt;br /&gt;
&lt;br /&gt;
    /* TX byte */&lt;br /&gt;
    *utxh0=c;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void set_lcd_brightness(unsigned int b)&lt;br /&gt;
{&lt;br /&gt;
    *tcmpb1=b;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main(void)&lt;br /&gt;
{&lt;br /&gt;
    unsigned int i;&lt;br /&gt;
&lt;br /&gt;
    /* Turn off display backlight during download */&lt;br /&gt;
    set_lcd_brightness(0);&lt;br /&gt;
    uart_init();&lt;br /&gt;
&lt;br /&gt;
    /* Dump 2MB ROM to serial port */&lt;br /&gt;
    for (i=0; i&amp;lt;0x200000; i++)&lt;br /&gt;
    {&lt;br /&gt;
        uart_tx_byte(i);        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /* Turn backlight to full on once download is complete */&lt;br /&gt;
    set_lcd_brightness(0xa00);&lt;br /&gt;
&lt;br /&gt;
    for(;;);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>RBot</name></author>	</entry>

	</feed>