adc_ctrl.rmh

来自「和picoblaze完全兼容的mcu ip core」· RMH 代码 · 共 1,582 行 · 第 1/5 页

RMH
1,582
字号
/* Symbol Table */// ADC0_lsb = CONSTANT: 0// ADC0_msb = CONSTANT: 1// ADC1_lsb = CONSTANT: 2// ADC1_msb = CONSTANT: 3// AD_sign = LABEL: 59// BTN_east = CONSTANT: 2// BTN_north = CONSTANT: 1// BTN_south = CONSTANT: 4// BTN_west = CONSTANT: 8// ISR = LABEL: 539// LCD_DB4 = CONSTANT: 16// LCD_DB5 = CONSTANT: 32// LCD_DB6 = CONSTANT: 64// LCD_DB7 = CONSTANT: 128// LCD_E = CONSTANT: 1// LCD_RS = CONSTANT: 4// LCD_RW = CONSTANT: 2// LCD_clear = LABEL: 524// LCD_cursor = LABEL: 529// LCD_drive = CONSTANT: 8// LCD_input_port = CONSTANT: 2// LCD_output_port = CONSTANT: 64// LCD_pulse_E = LABEL: 440// LCD_read_DB4 = CONSTANT: 16// LCD_read_DB5 = CONSTANT: 32// LCD_read_DB6 = CONSTANT: 64// LCD_read_DB7 = CONSTANT: 128// LCD_read_data8 = LABEL: 482// LCD_read_spare0 = CONSTANT: 1// LCD_read_spare1 = CONSTANT: 2// LCD_read_spare2 = CONSTANT: 4// LCD_read_spare3 = CONSTANT: 8// LCD_reset = LABEL: 507// LCD_write_data = LABEL: 465// LCD_write_inst4 = LABEL: 446// LCD_write_inst8 = LABEL: 450// LED0 = CONSTANT: 1// LED1 = CONSTANT: 2// LED2 = CONSTANT: 4// LED3 = CONSTANT: 8// LED4 = CONSTANT: 16// LED5 = CONSTANT: 32// LED6 = CONSTANT: 64// LED7 = CONSTANT: 128// LED_port = CONSTANT: 128// SPI_adc_conv = CONSTANT: 16// SPI_amp_cs = CONSTANT: 8// SPI_amp_sdi = CONSTANT: 64// SPI_amp_shdn = CONSTANT: 64// SPI_control_port = CONSTANT: 8// SPI_dac_clr = CONSTANT: 128// SPI_dac_cs = CONSTANT: 32// SPI_init = LABEL: 287// SPI_input_port = CONSTANT: 1// SPI_output_port = CONSTANT: 4// SPI_rom_cs = CONSTANT: 2// SPI_sck = CONSTANT: 1// SPI_sdi = CONSTANT: 128// SPI_sdo = CONSTANT: 128// SPI_spare_control = CONSTANT: 4// VREF_lsb = CONSTANT: 114// VREF_msb = CONSTANT: 6// adc_read = LABEL: 307// amp_A_gain = CONSTANT: 4// amp_B_gain = CONSTANT: 5// character_0 = CONSTANT: 48// character_1 = CONSTANT: 49// character_2 = CONSTANT: 50// character_3 = CONSTANT: 51// character_4 = CONSTANT: 52// character_5 = CONSTANT: 53// character_6 = CONSTANT: 54// character_7 = CONSTANT: 55// character_8 = CONSTANT: 56// character_9 = CONSTANT: 57// character_A = CONSTANT: 65// character_B = CONSTANT: 66// character_BS = CONSTANT: 8// character_C = CONSTANT: 67// character_CR = CONSTANT: 13// character_D = CONSTANT: 68// character_E = CONSTANT: 69// character_F = CONSTANT: 70// character_G = CONSTANT: 71// character_H = CONSTANT: 72// character_I = CONSTANT: 73// character_J = CONSTANT: 74// character_K = CONSTANT: 75// character_L = CONSTANT: 76// character_M = CONSTANT: 77// character_N = CONSTANT: 78// character_O = CONSTANT: 79// character_P = CONSTANT: 80// character_Q = CONSTANT: 81// character_R = CONSTANT: 82// character_S = CONSTANT: 83// character_T = CONSTANT: 84// character_U = CONSTANT: 85// character_V = CONSTANT: 86// character_W = CONSTANT: 87// character_X = CONSTANT: 88// character_Y = CONSTANT: 89// character_Z = CONSTANT: 90// character_a = CONSTANT: 97// character_b = CONSTANT: 98// character_c = CONSTANT: 99// character_colon = CONSTANT: 58// character_comma = CONSTANT: 44// character_d = CONSTANT: 100// character_divide = CONSTANT: 47// character_dollar = CONSTANT: 36// character_e = CONSTANT: 101// character_equals = CONSTANT: 61// character_exclaim = CONSTANT: 33// character_f = CONSTANT: 102// character_g = CONSTANT: 103// character_greater_than = CONSTANT: 62// character_h = CONSTANT: 104// character_i = CONSTANT: 105// character_j = CONSTANT: 106// character_k = CONSTANT: 107// character_l = CONSTANT: 108// character_less_than = CONSTANT: 60// character_m = CONSTANT: 109// character_minus = CONSTANT: 45// character_n = CONSTANT: 110// character_o = CONSTANT: 111// character_p = CONSTANT: 112// character_plus = CONSTANT: 43// character_q = CONSTANT: 113// character_question = CONSTANT: 63// character_r = CONSTANT: 114// character_s = CONSTANT: 115// character_semi_colon = CONSTANT: 59// character_space = CONSTANT: 32// character_stop = CONSTANT: 46// character_t = CONSTANT: 116// character_u = CONSTANT: 117// character_v = CONSTANT: 118// character_w = CONSTANT: 119// character_x = CONSTANT: 120// character_y = CONSTANT: 121// character_z = CONSTANT: 122// cold_start = LABEL: 0// decimal0 = CONSTANT: 7// decimal1 = CONSTANT: 8// decimal2 = CONSTANT: 9// decimal3 = CONSTANT: 10// decimal4 = CONSTANT: 11// delay_1ms = LABEL: 425// delay_1s = LABEL: 435// delay_1us = LABEL: 416// delay_1us_constant = CONSTANT: 11// delay_20ms = LABEL: 430// delay_40us = LABEL: 420// disp_AD = LABEL: 383// disp_ADC_Control = LABEL: 353// disp_PicoBlaze = LABEL: 334// disp_VA = LABEL: 376// disp_VINA_volts = LABEL: 114// disp_hex_byte = LABEL: 409// disp_volts = LABEL: 116// div10_loop = LABEL: 273// div10_restore = LABEL: 278// div10_shifts = LABEL: 281// divide_16bit_by_10 = LABEL: 266// gain_A7 = LABEL: 217// gain_decrease = LABEL: 141// gain_increase = LABEL: 134// hex_byte_to_ASCII = LABEL: 392// hex_to_ASCII = LABEL: 404// int_to_BCD_loop = LABEL: 260// integer16_to_BCD = LABEL: 258// m16s_loop = LABEL: 238// m16s_noadd = LABEL: 245// m16s_nosub = LABEL: 257// m16s_pos = LABEL: 236// mult_16x16s = LABEL: 228// mult_VINA = LABEL: 90// neg_AD = LABEL: 54// new_gain_set = LABEL: 146// next_adc_bit = LABEL: 313// next_amp_SPI_bit = LABEL: 294// number_char = LABEL: 407// s0 = REGISTER: 0// s1 = REGISTER: 1// s2 = REGISTER: 2// s3 = REGISTER: 3// s4 = REGISTER: 4// s5 = REGISTER: 5// s6 = REGISTER: 6// s7 = REGISTER: 7// s8 = REGISTER: 8// s9 = REGISTER: 9// sA = REGISTER: 10// sB = REGISTER: 11// sC = REGISTER: 12// sD = REGISTER: 13// sE = REGISTER: 14// sF = REGISTER: 15// sample_count = CONSTANT: 6// set_amp = LABEL: 290// set_line2 = LABEL: 535// switch0 = CONSTANT: 16// switch1 = CONSTANT: 32// switch2 = CONSTANT: 64// switch3 = CONSTANT: 128// switch_port = CONSTANT: 0// test_A2 = LABEL: 172// test_A3 = LABEL: 181// test_A4 = LABEL: 190// test_A5 = LABEL: 199// test_A6 = LABEL: 208// test_max_pos = LABEL: 108// wait_1ms = LABEL: 426// wait_1s = LABEL: 436// wait_1us = LABEL: 417// wait_20ms = LABEL: 431// wait_40us = LABEL: 421// wait_int = LABEL: 22// wait_no_press = LABEL: 223// warm_start = LABEL: 20/* Program Code */// #1: ;KCPSM3 Program - SPI Control of Amplifier and A/D converter on Spartan-3E Starter Kit.// #2: ;// #3: ;// #4: ;Ken Chapman - Xilinx Ltd// #5: ;// #6: ;Version v1.00 - 21th December 2005// #7: ;// #8: ;This program uses an 8KHz interrupt to generate test waveforms on the// #9: ;4 analogue outputs provided by the Linear Technology LTC2624 device.// #10: ;// #11: ;As well as the port connections vital to communication with the UART and the SPI// #12: ;FLASH memory, there are additional port connections used to disable the other// #13: ;devices sharing the SPI bus on the Starter Kit board. Although these could have been// #14: ;controlled at the hardware level, they are included in this code to aid// #15: ;future investigations of communication with the other SPI devices using PicoBlaze.// #16: ;// #17: ;Connections to the LEDs, switches and press buttons are provided to aid// #18: ;development and enable further experiments. Otherwise know as having fun!// #19: ;// #20: ;Port definitions// #21: ;// #22: ;// #23: CONSTANT(SPI_control_port,8) ;SPI clock and chip selects// #24: CONSTANT(SPI_sck,1) ;                  SCK - bit0// #25: CONSTANT(SPI_rom_cs,2) ;    serial rom select - bit1// #26: CONSTANT(SPI_spare_control,4) ;                spare - bit2// #27: CONSTANT(SPI_amp_cs,8) ;     amplifier select - bit3// #28: CONSTANT(SPI_adc_conv,16) ;          A/D convert - bit4// #29: CONSTANT(SPI_dac_cs,32) ;           D/A select - bit5// #30: CONSTANT(SPI_amp_shdn,64) ;       amplifier SHDN - bit6// #31: CONSTANT(SPI_dac_clr,128) ;            D/A clear - bit7// #32: ;// #33: CONSTANT(SPI_output_port,4) ;SPI data output// #34: CONSTANT(SPI_sdo,128) ;   SDO - bit7// #35: ;// #36: CONSTANT(SPI_input_port,1) ;SPI data input// #37: CONSTANT(SPI_sdi,128) ;             SDI - bit7// #38: CONSTANT(SPI_amp_sdi,64) ;   amplifier SDI - bit6// #39: ;// #40: ;// #41: CONSTANT(LED_port,128) ;8 simple LEDs// #42: CONSTANT(LED0,1) ;     LED 0 - bit0// #43: CONSTANT(LED1,2) ;         1 - bit1// #44: CONSTANT(LED2,4) ;         2 - bit2// #45: CONSTANT(LED3,8) ;         3 - bit3// #46: CONSTANT(LED4,16) ;         4 - bit4// #47: CONSTANT(LED5,32) ;         5 - bit5// #48: CONSTANT(LED6,64) ;         6 - bit6// #49: CONSTANT(LED7,128) ;         7 - bit7// #50: ;// #51: ;// #52: CONSTANT(switch_port,0) ;Read switches and press buttons// #53: CONSTANT(BTN_north,1) ;  Buttons     North - bit0// #54: CONSTANT(BTN_east,2) ;               East - bit1// #55: CONSTANT(BTN_south,4) ;              South - bit2// #56: CONSTANT(BTN_west,8) ;               West - bit3// #57: CONSTANT(switch0,16) ;  Switches        0 - bit4// #58: CONSTANT(switch1,32) ;                  1 - bit5// #59: CONSTANT(switch2,64) ;                  2 - bit6// #60: CONSTANT(switch3,128) ;                  3 - bit7// #61: ;// #62: ;LCD interface ports// #63: ;// #64: ;The master enable signal is not used by the LCD display itself// #65: ;but may be required to confirm that LCD communication is active.// #66: ;This is required on the Spartan-3E Starter Kit if the StrataFLASH// #67: ;is used because it shares the same data pins and conflicts must be avoided.// #68: ;// #69: CONSTANT(LCD_output_port,64) ;LCD character module output data and control// #70: CONSTANT(LCD_E,1) ;   active High Enable        E - bit0// #71: CONSTANT(LCD_RW,2) ;   Read=1 Write=0           RW - bit1// #72: CONSTANT(LCD_RS,4) ;   Instruction=0 Data=1     RS - bit2// #73: CONSTANT(LCD_drive,8) ;   Master enable (active High) - bit3// #74: CONSTANT(LCD_DB4,16) ;   4-bit              Data DB4 - bit4// #75: CONSTANT(LCD_DB5,32) ;   interface          Data DB5 - bit5// #76: CONSTANT(LCD_DB6,64) ;                      Data DB6 - bit6// #77: CONSTANT(LCD_DB7,128) ;                      Data DB7 - bit7// #78: ;// #79: ;// #80: CONSTANT(LCD_input_port,2) ;LCD character module input data// #81: CONSTANT(LCD_read_spare0,1) ;    Spare bits               - bit0// #82: CONSTANT(LCD_read_spare1,2) ;    are zero                 - bit1// #83: CONSTANT(LCD_read_spare2,4) ;                             - bit2// #84: CONSTANT(LCD_read_spare3,8) ;                             - bit3// #85: CONSTANT(LCD_read_DB4,16) ;    4-bit           Data DB4 - bit4// #86: CONSTANT(LCD_read_DB5,32) ;    interface       Data DB5 - bit5// #87: CONSTANT(LCD_read_DB6,64) ;                    Data DB6 - bit6// #88: CONSTANT(LCD_read_DB7,128) ;                    Data DB7 - bit7// #89: ;// #90: ;// #91: ;// #92: ;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?