This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

No subject

#include<LPC214x.h>
#define read1_31 (IO1PIN&0x80000000)
typedef unsigned long DWORD;
typedef unsigned short WORD;
typedef unsigned char Byte;
typedef unsigned int Boolean;
void io_init(void);
void send_lcd(Byte dat,Byte dd);
void delay_ms(DWORD d);
void lcd_init(void);
void num_conv(DWORD value);
void lcd_print(Byte ch);
void Humman_detected(void);
void Humman_not_detected(void);

void io_init()
{ SCS = 0; //I/O intialised as Normal I/O IO0DIR = 0xFFFFFFFF; IO1DIR = 0x7FFFFFFF; IO0PIN = 0xFFFFFFFF; IO1PIN = 0xFFFFFFFF;
}

void main()
{ DWORD value=0;
io_init();
lcd_init();
//printf(lcd_print,"\f WELCOME");
delay_ms(1000);
while(1)
{ while(!read1_31) { IO1SET=0x40000000; //Pin1_30 relay on Humman_detected(); delay_ms(1000); } send_lcd(0x01,0);
while(read1_31) { IO1CLR=0x40000000; //Pin1_30 relay off Humman_not_detected(); delay_ms(1000); } send_lcd(0x01,0);
} }
void Humman_detected()
{ send_lcd(0x85,0);
send_lcd('D',1);
send_lcd('E',1);
send_lcd('T',1);
send_lcd('E',1);
send_lcd('C',1);
send_lcd('T',1);
send_lcd('E',1);
send_lcd('D',1);
} void Humman_not_detected()
{ send_lcd(0x80,0);

send_lcd('N',1);
send_lcd('O',1);
send_lcd('T',1);
send_lcd(0xC5,0);
send_lcd('D',1);
send_lcd('E',1);
send_lcd('T',1);
send_lcd('E',1);
send_lcd('C',1);
send_lcd('T',1);
send_lcd('E',1);
send_lcd('D',1);
} /******************OLD HEX FILE-Generated by KEIL*****************/
:020000040000FA
:1000000018F09FE518F09FE518F09FE518F09FE5C0
:1000100018F09FE50000A0E1F0FF1FE518F09FE554
:1000200040000000100400000C0400000804000060
:10003000040400000000000000040000FC030000B5
:10004000B0009FE5AA10A0E35520A0E32430A0E370
:10005000043080E50130A0E3003080E50C1080E53D
/**************HEX FILE COMPILED in KEIL uvision4*********************************/
:020000040000FA
:1000000018F09FE518F09FE518F09FE518F09FE5C0
:1000100018F09FE50000A0E1F0FF1FE518F09FE554
:1000200058000000400000004400000048000000AC
:100030004C000000000000005000000054000000D0
:10004000FEFFFFEAFEFFFFEAFEFFFFEAFEFFFFEA18
/***********************************************/

  • Sorry, but am at a total loss.

    No subject.

    No message in the post.

    Just some scribbles that hasn't been formatted according to the information clearly visible directly above the message textbox.

    And two hexdumps, which seems to be generated from two unknown versions of Keil uVision.

    By the way - why do you unroll your loops? Wouldn't it have been much more elegant to have a send_lcd_string() function that can print a text string (character array) directly?

    And who is Humman? Are we talking about Humman as in food? Or are you trying to detect the effect of an Immelman a Humman in an F16?
    revver.com/.../

  • /**************HEX FILE COMPILED in KEIL uvision4*********************************/
    :020000040000FA
    :1000000018F09FE518F09FE518F09FE518F09FE5C0
    :1000100018F09FE50000A0E1F0FF1FE518F09FE554
    :1000200058000000400000004400000048000000AC
    :100030004C000000000000005000000054000000D0
    :10004000FEFFFFEAFEFFFFEAFEFFFFEAFEFFFFEA18
    /***********************************************/
    
    
    
    YOU MUST EDIT THESE WITH WINHEX.
    
    
    

  • Per,

    Great post! Very funny video indeed...!