-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 867e432
Showing
46 changed files
with
11,532 additions
and
0 deletions.
There are no files selected for viewing
79 changes: 79 additions & 0 deletions
79
ESDCP/AutoBrakeLPC2148-main/AutoBrakeLPC2148-main/Direct Stop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#include<lpc214x.h> | ||
#include"TIMER.H" | ||
#include"ULTRASONIC.H" | ||
#include"LCD.H" | ||
#define EN (1<<18)|(1<<21) | ||
#define IN (1<<16)|(1<<19) | ||
#define In (1<<17)|(1<<20) | ||
int cent = 100; | ||
#define delay for(i=0;i<65000;i++); | ||
unsigned int range,i; | ||
unsigned char* warn; | ||
unsigned int value; | ||
unsigned int buffer = 0; | ||
unsigned int get_bufreg(unsigned int trange){ | ||
if(trange<=100&trange>=50){return 1;} | ||
else if(range<50){return 0;} | ||
else{return 2;} | ||
} | ||
int main() | ||
{ VPBDIV=0x01; // PCLK = 60MHz | ||
IO0DIR |= 0x00FF3400; //10 12 13 16-23 | ||
IO1DIR = EN|In|IN; | ||
ultrasonic_init(); | ||
lcd_init(); | ||
show("Distance :"); | ||
IOSET1 = EN; | ||
while(1) { | ||
cmd(0x8A); | ||
range=get_range(); | ||
dat((range/100)%10+48); | ||
dat((range/10)%10+48); | ||
dat((range%10)+48); | ||
show("cm");//PWM_LOGIC(range); | ||
IO1CLR |= In; | ||
/*if (range<50){IOCLR1 = IOCLR1|EN; | ||
cmd(0xC0); | ||
show("CRASH WARNING "); | ||
} | ||
else if (range<=100&range>=50){ | ||
if(IOSET1&&EN == EN){ | ||
cmd(0xC0); | ||
show("CRASH WARNING "); | ||
cent =range; | ||
for(i=0;i<50;i++){ | ||
if(get_bufreg(buffer)==get_bufreg(range)){} | ||
else{ | ||
while(cent!=0){ | ||
range=get_range(); | ||
if(range<=100&range>=50){ | ||
IOSET1 = IOSET1|EN; | ||
timer1delay(cent*200); | ||
IOCLR1 = IOCLR1|EN; | ||
timer1delay((100-cent)*200); | ||
cent=cent-(1); | ||
} | ||
else{break;}} | ||
}} | ||
|
||
IOCLR1 = IOCLR1|EN; | ||
} | ||
else{IOCLR1 = IOCLR1|EN; | ||
cmd(0xC0); | ||
show("CRASH WARNING ");} | ||
buffer=range; | ||
range=get_range();} | ||
if (range>100){ | ||
IOSET1 = IOSET1|EN; | ||
cmd(0xC0); | ||
show("You are safe :) ");}*/ | ||
if (range<100){IOCLR1 = IOCLR1|EN|IN; | ||
cmd(0xC0); | ||
show("CRASH WARNING "); | ||
} | ||
if (range>100){ | ||
IOSET1 = IOSET1|EN|IN; | ||
cmd(0xC0); | ||
show("You are safe :) ");} | ||
} | ||
return 0;} |
9 changes: 9 additions & 0 deletions
9
ESDCP/AutoBrakeLPC2148-main/AutoBrakeLPC2148-main/EventRecorderStub.scvd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<component_viewer schemaVersion="0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="Component_Viewer.xsd"> | ||
|
||
<component name="EventRecorderStub" version="1.0.0"/> <!--name and version of the component--> | ||
<events> | ||
</events> | ||
|
||
</component_viewer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#include <LPC214X.H> | ||
#define bit(x) (1<<x) | ||
void lcd_init(); | ||
unsigned char a; | ||
void cmd(unsigned char a); | ||
void dat(unsigned char b); | ||
void show(unsigned char *s); | ||
void lcd_delay(); | ||
void lcd_init() | ||
{ | ||
cmd(0x38); | ||
cmd(0x0e); | ||
cmd(0x06); | ||
cmd(0x0c); | ||
cmd(0x80); | ||
} | ||
void cmd(unsigned char a) | ||
{ | ||
|
||
IO0PIN &= 0x00; | ||
IO0PIN|=(a<<16); | ||
IO0CLR|=bit(10); //rs=0 | ||
IO0CLR|=bit(12); //rw=0 | ||
IO0SET|=bit(13); //en=1 | ||
lcd_delay(); | ||
IO0CLR|=bit(13); //en=0 | ||
} | ||
void dat(unsigned char b) | ||
{ | ||
IO0PIN &= 0x00; | ||
IO0PIN|=(b<<16); | ||
IO0SET|=bit(10); //rs=1 | ||
IO0CLR|=bit(12); //rw=0 | ||
IO0SET|=bit(13); //en=1 | ||
lcd_delay(); | ||
IO0CLR|=bit(13); //en=0 | ||
} | ||
void show(unsigned char *s) | ||
{ | ||
while(*s) { | ||
dat(*s++); | ||
} | ||
} | ||
void lcd_delay(){ | ||
unsigned int i; | ||
for(i=0;i<=1000;i++);} |
615 changes: 615 additions & 0 deletions
615
ESDCP/AutoBrakeLPC2148-main/AutoBrakeLPC2148-main/Listings/MIni.map
Large diffs are not rendered by default.
Oops, something went wrong.
526 changes: 526 additions & 0 deletions
526
ESDCP/AutoBrakeLPC2148-main/AutoBrakeLPC2148-main/Listings/UART.map
Large diffs are not rendered by default.
Oops, something went wrong.
122 changes: 122 additions & 0 deletions
122
ESDCP/AutoBrakeLPC2148-main/AutoBrakeLPC2148-main/Listings/hey.map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
Component: ARM Compiler 5.06 update 6 (build 750) Tool: armlink [4d35ed] | ||
|
||
============================================================================== | ||
|
||
Section Cross References | ||
|
||
startup.o(STACK) refers (Special) to heapauxi.o(.text) for __use_two_region_memory | ||
startup.o(HEAP) refers (Special) to heapauxi.o(.text) for __use_two_region_memory | ||
startup.o(RESET) refers (Special) to heapauxi.o(.text) for __use_two_region_memory | ||
startup.o(RESET) refers to startup.o(STACK) for Stack_Top | ||
startup.o(RESET) refers to __main.o(!!!main) for __main | ||
startup.o(.text) refers (Special) to heapauxi.o(.text) for __use_two_region_memory | ||
startup.o(.text) refers to startup.o(HEAP) for Heap_Mem | ||
startup.o(.text) refers to startup.o(STACK) for Stack_Mem | ||
__main.o(!!!main) refers to __rtentry.o(.ARM.Collect$$rtentry$$00000000) for __rt_entry | ||
__rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry2.o(.ARM.Collect$$rtentry$$0000000A) for __rt_entry_li | ||
__rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry2.o(.ARM.Collect$$rtentry$$0000000D) for __rt_entry_main | ||
__rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry2.o(.ARM.Collect$$rtentry$$0000000C) for __rt_entry_postli_1 | ||
__rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry2.o(.ARM.Collect$$rtentry$$00000009) for __rt_entry_postsh_1 | ||
__rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry2.o(.ARM.Collect$$rtentry$$00000002) for __rt_entry_presh_1 | ||
__rtentry.o(.ARM.Collect$$rtentry$$00000000) refers (Special) to __rtentry4.o(.ARM.Collect$$rtentry$$00000004) for __rt_entry_sh | ||
__rtentry2.o(.ARM.Collect$$rtentry$$00000008) refers to boardinit2.o(.text) for _platform_post_stackheap_init | ||
__rtentry2.o(.ARM.Collect$$rtentry$$0000000A) refers to libinit.o(.ARM.Collect$$libinit$$00000000) for __rt_lib_init | ||
__rtentry2.o(.ARM.Collect$$rtentry$$0000000B) refers to boardinit3.o(.text) for _platform_post_lib_init | ||
__rtentry2.o(.ARM.Collect$$rtentry$$0000000D) refers to exit.o(.text) for exit | ||
__rtentry2.o(.ARM.exidx) refers to __rtentry2.o(.ARM.Collect$$rtentry$$00000001) for .ARM.Collect$$rtentry$$00000001 | ||
__rtentry2.o(.ARM.exidx) refers to __rtentry2.o(.ARM.Collect$$rtentry$$00000008) for .ARM.Collect$$rtentry$$00000008 | ||
__rtentry2.o(.ARM.exidx) refers to __rtentry2.o(.ARM.Collect$$rtentry$$0000000A) for .ARM.Collect$$rtentry$$0000000A | ||
__rtentry2.o(.ARM.exidx) refers to __rtentry2.o(.ARM.Collect$$rtentry$$0000000B) for .ARM.Collect$$rtentry$$0000000B | ||
__rtentry2.o(.ARM.exidx) refers to __rtentry2.o(.ARM.Collect$$rtentry$$0000000D) for .ARM.Collect$$rtentry$$0000000D | ||
__rtentry4.o(.ARM.Collect$$rtentry$$00000004) refers to sys_stackheap_outer.o(.text) for __user_setup_stackheap | ||
__rtentry4.o(.ARM.exidx) refers to __rtentry4.o(.ARM.Collect$$rtentry$$00000004) for .ARM.Collect$$rtentry$$00000004 | ||
sys_stackheap_outer.o(.text) refers to libspace.o(.text) for __user_perproc_libspace | ||
sys_stackheap_outer.o(.text) refers to startup.o(.text) for __user_initial_stackheap | ||
exit.o(.text) refers to rtexit.o(.ARM.Collect$$rtexit$$00000000) for __rt_exit | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000002E) for __rt_lib_init_alloca_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000027) for __rt_lib_init_argv_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000001B) for __rt_lib_init_atexit_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000021) for __rt_lib_init_clock_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000032) for __rt_lib_init_cpp_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000030) for __rt_lib_init_exceptions_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000002) for __rt_lib_init_fp_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000001F) for __rt_lib_init_fp_trap_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000023) for __rt_lib_init_getenv_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000000A) for __rt_lib_init_heap_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000011) for __rt_lib_init_lc_collate_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000013) for __rt_lib_init_lc_ctype_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000015) for __rt_lib_init_lc_monetary_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000017) for __rt_lib_init_lc_numeric_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000019) for __rt_lib_init_lc_time_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000004) for __rt_lib_init_preinit_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000000E) for __rt_lib_init_rand_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000033) for __rt_lib_init_return | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000001D) for __rt_lib_init_signal_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$00000025) for __rt_lib_init_stdio_1 | ||
libinit.o(.ARM.Collect$$libinit$$00000000) refers (Special) to libinit2.o(.ARM.Collect$$libinit$$0000000C) for __rt_lib_init_user_alloc_1 | ||
libspace.o(.text) refers to libspace.o(.bss) for __libspace_start | ||
rtexit.o(.ARM.Collect$$rtexit$$00000000) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000004) for __rt_exit_exit | ||
rtexit.o(.ARM.Collect$$rtexit$$00000000) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000003) for __rt_exit_ls | ||
rtexit.o(.ARM.Collect$$rtexit$$00000000) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000002) for __rt_exit_prels_1 | ||
rtexit.o(.ARM.exidx) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000004) for __rt_exit_exit | ||
rtexit.o(.ARM.exidx) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000003) for __rt_exit_ls | ||
rtexit.o(.ARM.exidx) refers (Special) to rtexit2.o(.ARM.Collect$$rtexit$$00000002) for __rt_exit_prels_1 | ||
rtexit.o(.ARM.exidx) refers to rtexit.o(.ARM.Collect$$rtexit$$00000000) for .ARM.Collect$$rtexit$$00000000 | ||
libinit2.o(.ARM.Collect$$libinit$$00000001) refers to fpinit.o(x$fpl$fpinit) for _fp_init | ||
libinit2.o(.ARM.Collect$$libinit$$00000010) refers to libinit2.o(.ARM.Collect$$libinit$$0000000F) for .ARM.Collect$$libinit$$0000000F | ||
libinit2.o(.ARM.Collect$$libinit$$00000012) refers to libinit2.o(.ARM.Collect$$libinit$$0000000F) for .ARM.Collect$$libinit$$0000000F | ||
libinit2.o(.ARM.Collect$$libinit$$00000014) refers to libinit2.o(.ARM.Collect$$libinit$$0000000F) for .ARM.Collect$$libinit$$0000000F | ||
libinit2.o(.ARM.Collect$$libinit$$00000016) refers to libinit2.o(.ARM.Collect$$libinit$$0000000F) for .ARM.Collect$$libinit$$0000000F | ||
libinit2.o(.ARM.Collect$$libinit$$00000018) refers to libinit2.o(.ARM.Collect$$libinit$$0000000F) for .ARM.Collect$$libinit$$0000000F | ||
libinit2.o(.ARM.Collect$$libinit$$00000026) refers to argv_veneer.o(.emb_text) for __ARM_argv_veneer | ||
libinit2.o(.ARM.Collect$$libinit$$00000027) refers to argv_veneer.o(.emb_text) for __ARM_argv_veneer | ||
rtexit2.o(.ARM.Collect$$rtexit$$00000003) refers to libshutdown.o(.ARM.Collect$$libshutdown$$00000000) for __rt_lib_shutdown | ||
rtexit2.o(.ARM.Collect$$rtexit$$00000004) refers to sys_exit.o(.text) for _sys_exit | ||
rtexit2.o(.ARM.exidx) refers to rtexit2.o(.ARM.Collect$$rtexit$$00000001) for .ARM.Collect$$rtexit$$00000001 | ||
rtexit2.o(.ARM.exidx) refers to rtexit2.o(.ARM.Collect$$rtexit$$00000003) for .ARM.Collect$$rtexit$$00000003 | ||
rtexit2.o(.ARM.exidx) refers to rtexit2.o(.ARM.Collect$$rtexit$$00000004) for .ARM.Collect$$rtexit$$00000004 | ||
argv_veneer.o(.emb_text) refers to _get_argv_nomalloc.o(.text) for __ARM_get_argv | ||
sys_exit.o(.text) refers (Special) to use_no_semi.o(.text) for __I$use$semihosting | ||
sys_exit.o(.text) refers (Special) to indicate_semi.o(.text) for __semihosting_library_function | ||
_get_argv_nomalloc.o(.text) refers (Special) to hrguard.o(.text) for __heap_region$guard | ||
_get_argv_nomalloc.o(.text) refers to defsig_rtmem_outer.o(.text) for __rt_SIGRTMEM | ||
_get_argv_nomalloc.o(.text) refers to sys_command.o(.text) for _sys_command_string | ||
libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$00000002) for __rt_lib_shutdown_cpp_1 | ||
libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$00000007) for __rt_lib_shutdown_fp_trap_1 | ||
libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$0000000F) for __rt_lib_shutdown_heap_1 | ||
libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$00000010) for __rt_lib_shutdown_return | ||
libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$0000000A) for __rt_lib_shutdown_signal_1 | ||
libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$00000004) for __rt_lib_shutdown_stdio_1 | ||
libshutdown.o(.ARM.Collect$$libshutdown$$00000000) refers (Special) to libshutdown2.o(.ARM.Collect$$libshutdown$$0000000C) for __rt_lib_shutdown_user_alloc_1 | ||
sys_command.o(.text) refers (Special) to use_no_semi.o(.text) for __I$use$semihosting | ||
sys_command.o(.text) refers (Special) to indicate_semi.o(.text) for __semihosting_library_function | ||
defsig_rtmem_outer.o(.text) refers to defsig_rtmem_inner.o(.text) for __rt_SIGRTMEM_inner | ||
defsig_rtmem_outer.o(.text) refers to defsig_exit.o(.text) for __sig_exit | ||
defsig_rtmem_formal.o(.text) refers to rt_raise.o(.text) for __rt_raise | ||
rt_raise.o(.text) refers to __raise.o(.text) for __raise | ||
rt_raise.o(.text) refers to sys_exit.o(.text) for _sys_exit | ||
defsig_exit.o(.text) refers to sys_exit.o(.text) for _sys_exit | ||
defsig_rtmem_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display | ||
__raise.o(.text) refers to __raise.o(i.__ARM_common_call_via_r2) for __ARM_common_call_via_r2 | ||
__raise.o(.text) refers to defsig.o(CL$$defsig) for __default_signal_handler | ||
defsig_general.o(.text) refers to sys_wrch.o(.text) for _ttywrch | ||
sys_wrch.o(.text) refers (Special) to use_no_semi.o(.text) for __I$use$semihosting | ||
sys_wrch.o(.text) refers (Special) to indicate_semi.o(.text) for __semihosting_library_function | ||
defsig.o(CL$$defsig) refers to defsig_rtmem_inner.o(.text) for __rt_SIGRTMEM_inner | ||
defsig_abrt_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display | ||
defsig_fpe_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display | ||
defsig_rtred_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display | ||
defsig_stak_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display | ||
defsig_pvfn_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display | ||
defsig_cppl_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display | ||
defsig_segv_inner.o(.text) refers to defsig_general.o(.text) for __default_signal_display | ||
defsig_other.o(.text) refers to defsig_general.o(.text) for __default_signal_display | ||
|
||
|
||
============================================================================== | ||
|
||
Removing Unused input sections from the image. | ||
|
||
Removing startup.o(RESET), (272 bytes). | ||
|
||
1 unused section(s) (total 272 bytes) removed from the image. |
Oops, something went wrong.