/Designs/galileo_experiment/SW/main.c
46,9 → 46,12
enable_interrupts(GLOBAL);
setup_adc_ports(AN0_TO_AN2|VSS_VREF);
setup_adc(ADC_CLOCK_DIV_32);
setup_adc(ADC_CLOCK_DIV_64);
 
usb_init(); // initialise USB module
 
while (TRUE)
{
while(!usb_cdc_connected());
time=0;
82,4 → 85,5
// odesli namerene hodnoty
printf(usb_cdc_putc, "%7.3f %4.3f %4.3f %4.3f %4.3f %4.3f %4.3f \n\r",((time << 16) + get_timer0())/15625.0, xavg, quadraticerror(xavg,x,BUFLEN), yavg, quadraticerror(yavg,y,BUFLEN), zavg, quadraticerror(zavg,z,BUFLEN)); //konstanta k je kvuli prevodu do rozzumnych jednotek [s]
}
}
}
/Designs/galileo_experiment/SW/main.hex
509,7 → 509,7
:101FA000870ED56ECD6A000ECA6E000ECB6EB16A7A
:101FB000070EB46E9250926E130E006E002EFED776
:101FC00000D0B450A19CB56AF28AC00EF212C15082
:101FD000C00B1C09C16EC090C082C094C08EC2806C
:101FD000C00B1C09C16EC090C082C084C08EC2807C
:101FE000B4EF09F080A1FED71C6A1B6A1A6A196A4D
:101FF000D76AD66A0301B16BB15100010FEC01F051
:102000000301B12B006EE8CFDBF60001EAEC09F02A
605,9 → 605,10
:1025A000D1F6C0C3D0F6BFC3CFF6BEC3CEF6060188
:1025B000D26F0001D8EC0EF0200E0601DB6F000197
:1025C000EAEC09F00A0E0601DB6F0001EAEC09F003
:1025D0000D0E0601DB6F0001EAEC09F01ED50300C9
:1025D0000D0E0601DB6F0001EAEC09F01ED502D5F5
:0225E0000300F6
:020000040030CA
:0E0000003CCE390E0087A1000FC00FE00F406C
:00000001FF
;PIC18F4550
;CRC=FA32 CREATED="28-V-10 17:50"
;CRC=66E2 CREATED="15-V-10 23:52"
/Designs/galileo_experiment/SW/main.lst
1,9 → 1,9
CCS PCH C Compiler, Version 4.090, 47914 28-V-10 17:50
CCS PCH C Compiler, Version 4.090, 47914 15-V-10 23:52
 
Filename: D:\MLAB\Designs\galileo_experiment\SW\main.lst
Filename: D:\svnKaklik\programy\C\PIC_C\mereni\inertial\main.lst
 
ROM used: 9692 bytes (30%)
Largest free fragment is 23072
ROM used: 9694 bytes (30%)
Largest free fragment is 23070
RAM used: 1650 (81%) at main() level
1869 (91%) worst case
Stack: 17 worst case (8 in main + 9 for interrupts)
11102,15 → 11102,18
1FD0: ANDLW C0
1FD2: IORLW 1C
1FD4: MOVWF FC1
.................... setup_adc(ADC_CLOCK_DIV_32);
.................... setup_adc(ADC_CLOCK_DIV_64);
1FD6: BCF FC0.0
1FD8: BSF FC0.1
1FDA: BCF FC0.2
1FDA: BSF FC0.2
1FDC: BSF FC0.7
1FDE: BSF FC2.0
....................
.................... usb_init(); // initialise USB module
1FE0: GOTO 1368
....................
.................... while (TRUE)
.................... {
....................
.................... while(!usb_cdc_connected());
1FE4: BTFSS x80.0
11695,8 → 11698,10
25D8: CALL 13D4
.................... }
25DC: BRA 201A
.................... }
25DE: BRA 1FE4
.................... }
25DE: SLEEP
25E0: SLEEP
 
Configuration Fuses:
Word 1: CE3C IESO FCMEN HSPLL PLL5 CPUDIV4 USBDIV
/Designs/galileo_experiment/SW/main.pjt
31,7 → 31,7
13=
[Target Data]
OptionString=-p +FH
FileList=D:\MLAB\Designs\galileo_experiment\SW\main.c
FileList=D:\svnKaklik\programy\C\PIC_C\mereni\inertial\main.c
[Units]
Count=1
1=main.c (main)