十六进制转八进制c++代码_如何将十六进制代码上传到微控制器?

十六进制转八进制c++代码

Read: 8051 Microcontroller programming using Keil Uvision IDE

阅读: 使用Keil Uvision IDE进行8051单片机编程

将HEX文件上传到微控制器 (Uploading a HEX file to Microcontroller)

Once you have developed the hex code for the program which is to upload to the microcontroller, the next major task is to burn the hex code properly into the device. If the microcontroller has an inbuilt bootloader then it is possible to upload the code using the serial port. Mostly you will require a USBASP programmer to dump your code. The programmer is a hardware device that contains inbuilt software to assist in transferring of codes to a microcontroller via PC.

为要上传到微控制器的程序开发十六进制代码后,下一个主要任务是将十六进制代码正确刻录到设备中。 如果微控制器具有内置的引导程序,则可以使用串行端口上载代码。 通常,您将需要USBASP程序员来转储代码。 编程器是一种硬件设备,其中包含内置软件,以帮助通过PC将代码传输到微控制器。

Here, we will be using ATMEL 8051 AVR USB ISP Programmer for burning our required code.

在这里,我们将使用ATMEL 8051 AVR USB ISP编程器来刻录所需的代码。

ATMEL 8051 AVR USB ISP Programmer

ProgISP (ProgISP)

  • It is a tool through which you can perform code uploading on all AVR chips, it also supports AT89S51, AT89S52.

    它是您可以在所有AVR芯片上执行代码上传的工具,它还支持AT89S51,AT89S52。

  • Custom serial download programming.

    自定义串行下载编程。

  • Supports custom programmed chips.

    支持定制的编程芯片。

  • Supports high voltage programmers.

    支持高压编程器。

  • Project Management.

    项目管理。

  • Standalone tool – No installation required.

    独立工具–无需安装。

USB ISP编程器的功能 (Features of USB ISP Programmer)

  • Supports multiple platforms linux, Mac OS and Windows.

    支持多种平台的linux,Mac OS和Windows。

  • Jumper for 5V supply.

    5V电源跳线。

  • Contains Header Pin for easy interface of various ISP header pin.

    包含Header Pin,可轻松连接各种ISP Header引脚。

  • SCK option to support target with low clock speed.

    SCK选项可支持低时钟速度的目标。

将十六进制代码上传到微控制器的步骤 (Steps to upload HEX code to microcontroller)

  1. Download ProgISP, which is a zip file. Extract it in a folder. No need to install it, it is a self-executable software, click on progisp.exe to launch it.

    下载ProgISP,它是一个zip文件。 将其解压缩到一个文件夹中。 无需安装,它是可自行执行的软件,单击progisp.exe以启动它。

  2. USBASP should be connected to the AVR microcontroller development board using the 6 pin connectors. Make sure jumper J1 is connected.

    应使用6针连接器将USBASP连接到AVR微控制器开发板。 确保已连接跳线J1。

  3. Check the program state in the progisp interface, it should show colored icons of USB and ASP or else if it is faded then look for errors in connections, power supply or jumper connection.

    在progisp界面中检查程序状态,它应显示USB和ASP的彩色图标,否则,如果其褪色,则查找连接,电源或跳线连接中的错误。

  4. Select the type of chip you are working within our case it is AT89S52.

    在我们的案例中,选择要工作的芯片类型为AT89S52。

  5. In the task, windows look for the following to be checked with a tick.

    在任务中,窗口查找要打勾的项目。

    • Verify Signature
    • Chip Erase
    • Program Flash
    • Verify Flash
  6. Click on load flash from the leftmost tab, this tab is used to load the hex file. Click on the tab and locate the hex file.

    单击最左侧选项卡上的加载闪存,此选项卡用于加载十六进制文件。 单击选项卡并找到十六进制文件。

  7. Now click on Auto to begin the burning process. All the options which you have ticked from the task box will be performed during the process.

    现在单击自动开始刻录过程。 您在任务框中打勾的所有选项将在此过程中执行。

  8. Your code is successfully transferred to the microcontroller.

    您的代码已成功传输到微控制器。

  9. In order to erase the code, untick all options from task box except Chip Erase.

    为了清除该代码,请取消选中任务框中除“芯片擦除”之外的所有选项。

How to upload HEX code to microcontrollers?

翻译自: https://www.includehelp.com/embedded-system/how-to-upload-hex-code-to-microcontrollers.aspx

十六进制转八进制c++代码

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值