超声ct matlab仿真,超声仿真matlab库Field_II_PC7

【实例简介】

完整的超声仿真函数库Field_II_PC7以及安装使用指南。

【实例截图】

【核心代码】

9e874729-3609-4ed8-81e9-32b35e8aa6d5

└── Matlab超声仿真库

├── users_guide.pdf

├── 超声仿真matlab库Field_II_PC7

│   ├── calc_hhp.m

│   ├── calc_h.m

│   ├── calc_hp.m

│   ├── calc_scat_all.m

│   ├── calc_scat.m

│   ├── calc_scat_multi.m

│   ├── ele_apodization.m

│   ├── ele_delay.m

│   ├── ele_waveform.m

│   ├── field_debug.m

│   ├── field_end.m

│   ├── field_guide.m

│   ├── field_init.m

│   ├── field_logo.m

│   ├── logo_field.mat

│   ├── Mat_field.mexw32

│   ├── Mat_field.mexw64

│   ├── set_field.m

│   ├── set_sampling.m

│   ├── users_guide.pdf

│   ├── xdc_2d_array.m

│   ├── xdc_apodization.m

│   ├── xdc_baffle.m

│   ├── xdc_center_focus.m

│   ├── xdc_concave.m

│   ├── xdc_convert.m

│   ├── xdc_convex_array.m

│   ├── xdc_convex_focused_array.m

│   ├── xdc_convex_focused_multirow.m

│   ├── xdc_dynamic_focus.m

│   ├── xdc_excitation.m

│   ├── xdc_focused_array.m

│   ├── xdc_focused_multirow.m

│   ├── xdc_focus.m

│   ├── xdc_focus_times.m

│   ├── xdc_free.m

│   ├── xdc_get.m

│   ├── xdc_impulse.m

│   ├── xdc_linear_array.m

│   ├── xdc_linear_multirow.m

│   ├── xdc_line_convert.m

│   ├── xdc_lines.m

│   ├── xdc_piston.m

│   ├── xdc_quantization.m

│   ├── xdc_rectangles.m

│   ├── xdc_show.m

│   ├── xdc_times_focus.m

│   └── xdc_triangles.m

├── 超声仿真matlab库Field_II_PC7.zip

└── 配置说明.txt

2 directories, 51 files

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,下面给出具体的步骤: 1. 首先需要在代码中引入stm32f103ret6hal的头文件: ```c #include "stm32f1xx_hal.h" ``` 2. 然后需要定义PC0到PC7这8个引脚的IO口: ```c #define ROW1 GPIO_PIN_0 #define ROW2 GPIO_PIN_1 #define ROW3 GPIO_PIN_2 #define ROW4 GPIO_PIN_3 #define COL1 GPIO_PIN_4 #define COL2 GPIO_PIN_5 #define COL3 GPIO_PIN_6 #define COL4 GPIO_PIN_7 #define ROW_PORT GPIOC #define COL_PORT GPIOC ``` 3. 接下来需要初始化这些IO口,将行引脚设置为上拉输入模式,列引脚设置为推挽输出模式: ```c GPIO_InitTypeDef GPIO_InitStruct = {0}; /*Configure GPIO pins : ROW1 ROW2 ROW3 ROW4 */ GPIO_InitStruct.Pin = ROW1|ROW2|ROW3|ROW4; GPIO_InitStruct.Mode = GPIO_MODE_INPUT; GPIO_InitStruct.Pull = GPIO_PULLUP; HAL_GPIO_Init(ROW_PORT, &GPIO_InitStruct); /*Configure GPIO pins : COL1 COL2 COL3 COL4 */ GPIO_InitStruct.Pin = COL1|COL2|COL3|COL4; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(COL_PORT, &GPIO_InitStruct); ``` 4. 然后在主函数中编写矩阵键盘的扫描程序,当检测到有按键按下时,就将对应的按键编号显示出来: ```c int main(void) { /* 硬件初始化 */ HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); /* 矩阵键盘扫描程序 */ while (1) { if (HAL_GPIO_ReadPin(ROW_PORT, ROW1) == GPIO_PIN_RESET) // 检测第一行 { HAL_GPIO_WritePin(COL_PORT, COL1, GPIO_PIN_RESET); HAL_Delay(10); if (HAL_GPIO_ReadPin(ROW_PORT, ROW1) == GPIO_PIN_RESET) { printf("按下了1号键\n"); // 显示按键编号 while (HAL_GPIO_ReadPin(ROW_PORT, ROW1) == GPIO_PIN_RESET); } HAL_GPIO_WritePin(COL_PORT, COL1, GPIO_PIN_SET); } // 依照上述方法扫描其他行列 } } ``` 注意:由于矩阵键盘的扫描需要比较频繁地读取IO口的状态,因此需要在主函数中加入适当的延时,否则可能会出现误检的情况。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值