登录
首页 » 嵌入式系统 » CH375并口方式控制打印机

CH375并口方式控制打印机

于 2023-09-03 发布 文件大小:97.58 kB
0 19
下载积分: 2 下载次数: 2

代码说明:

应用背景 单片机通过CH375链接USB口的打印机 // 单片机通过CH375控制USB打印机  // 程序示例,C语言,CH375中断为查询方式,只负责数据传输,不涉及打印格式及打印描述语言  // 另可提供多台计算机共享一台USB打印机的方案  // 以下定义适用于AVR 单片机,其它单片机参照修改,为了提供C语言的速度需要对本程序进行优化  关键技术 /* PORTB |= 0x08;  // 输出A0=1  PORTA = mCmd;  // 向CH375的并口输出数据  DDRA = 0xFF;  // 并口D0-D7输出  PORTB &= 0xF9;  // 输出有效写控制信号, 写CH375芯片的命令端口, A0=1; CS=0; WR=0; RD=1; DDRA = 0xFF;  // 该操作无意义,仅作延时,CH375要求读写脉冲宽度大于100nS  PORTB |= 0x07;  // 输出无效的控制信号, 完成操作CH375芯片, A0=1; CS=1; WR=1; RD=1;  DDRA = 0x00;  // 禁止数据输出  PORTB &= 0xF7;  // 输出A0=0; 可选操作  */

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • MFC串口编程实例(20个)
    MFC串口编程实例,总共20个实例,有基于MScom控件的编程,也有基于windowsAPI的串口编程,提供了完整了串口类,可直接使用,有完整的串口调试助手的源码,比较有学习价值。
    2022-04-27 17:25:15下载
    积分:1
  • 嘟嘟使用keil程序代码。
    beep use keil to program this code.
    2022-03-04 12:27:41下载
    积分:1
  • The objective is to set up SPI communication between VTI Technologies digital p...
    The objective is to set up SPI communication between VTI Technologies digital pressure sensor component and an MCU of an application device ATMEGA16L. In this code example: ?The MCU is configured ?SCP1000-D01 is initialized and configured ?The high resolution measurement mode is activated ?Temperature and pressure information is read always when the DRDY pin is in high state Please refer to the document "SCP1000 Product Family Specification 8260800" for further information on SCP1000 register addressing and SPI communication. This document applies to the SCP1000-D01.-The objective is to set up SPI communication between VTI Technologies digital pressure sensor component and an MCU of an application device ATMEGA16L. In this code example: ?The MCU is configured ?SCP1000-D01 is initialized and configured ?The high resolution measurement mode is activated ?Temperature and pressure information is read always when the DRDY pin is in high state Please refer to the
    2023-04-01 07:10:03下载
    积分:1
  • pic 正弦波发生器
    这个程序演示了如何使用 PWM 通道 4要输出正弦波脉宽调制信道上的单刃模式。PCLK 设置为 15 兆赫和那里是没有 prescaling 这样 PWM 时钟是 15 mhz。基准利率设置为 256 基地的 100 H 10 所以基地的 PWM 频率处于 15 兆赫/256 = 58.95375 千赫。
    2022-08-25 08:00:33下载
    积分:1
  • 用c编写的基于ARM的max1246的驱动程序源码和应用示例。
    用c编写的基于ARM的max1246的驱动程序源码和应用示例。-c prepared with the ARM-based max1246 driver source code and application examples.
    2022-01-26 04:16:00下载
    积分:1
  • 开发中的一些图形函数与汉字处理程序
    嵌入式开发中的一些图形函数与汉字处理程序-Embedded Development some graphics functions and processes of Chinese characters
    2023-07-20 08:55:03下载
    积分:1
  • 采用等精度测频原理的频率计 要求: 设计一个用等精度测频原理的频率计。 频率测量测量范围1~9999; 其精度为 ; 用4...
    采用等精度测频原理的频率计 要求: 设计一个用等精度测频原理的频率计。 频率测量测量范围1~9999; 其精度为 ; 用4位带小数点数码管显示其频率; 并且具有超量程、欠量程提示功能。-With equal precision frequency measurement principle of the frequency of meter requirements: design of a frequency measurement with the principle of equal precision frequency counter. Frequency Measurement Measuring Range 1 ~ 9999 its accuracy with four with a decimal point LED display its frequency and has a super-range, less range prompts.
    2022-05-23 07:53:55下载
    积分:1
  • 工业控制机EPIC v2.0标准,包含机构标准、设计标准等
    嵌入式工业控制机EPIC v2.0标准,包含机构标准、设计标准等-Embedded Industrial Control Machine EPIC v2.0 standard, including institutional standards, design standards, etc.
    2022-01-26 01:23:44下载
    积分:1
  • 在TMS320VC5402上实现的TCPIP协议栈
    在TMS320VC5402上实现的嵌入式TCPIP协议栈--Implement embedded TCP/IP protocol stack on TMS320VC5402.
    2022-05-23 19:18:32下载
    积分:1
  • 一个TCP / IP协议栈源uClinux
    uCLinux下的一个TCP/IP协议栈源码-uCLinux of a TCP/IP protocol stack source
    2022-07-26 12:07:28下载
    积分:1
  • 696524资源总数
  • 103957会员总数
  • 51今日下载