久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 2063|回復: 1
打印 上一主題 下一主題
收起左側

請幫忙看看這個PIC單片機程序,編譯通過,但是仿真和實際電路都不運行

[復制鏈接]
跳轉到指定樓層
樓主
這是一個電調程序,按照說明編譯通過了,但就是不能用,請大神幫我編譯一下看看,到底啥問題。謝謝!!!用proteus仿真報錯:
實際電路中,上電后沒有任何反應。
原理圖如下:

程序在這里:
程序.rar (19.49 KB, 下載次數: 5)


英文的說明如下:
This project documents how to build and construct your own Brushed Motor ESC for Cars and Boats using a Microchip 12F675 PIC and a small number of standard components.
This ESC is an extension of an earlier aircraft ESC and the reader is referred to the earlier ESC for full details of the design.
Background
This ESC grew out of an earlier aircraft ESC. A number of people asked for an ESC with brake and reverse operations that were suited to Car and Boat operations. While the earlier design provided basic reverse facilities I decided not to extend the aircraft design, but rather to revise the design and produce a project targeted specifically at cars and boats.
This ESC operates in a very similar manner to the Team Tekin "Rebel 2" ESC and offers all of the key features of the earlier aircraft ESC as well as push-button programming.
A futher requirement was the desire to be able to use either a relay or an H-bridge to provide motor reverse. This project incorporates both options.
What this ESC offers
This ESC design offers the following features that are fully explained in the aircraft ESC documentation:
  • Safety startup, requires throttle be off to arm ESC.
  • Signal loss stop, stops motor on loss of valid signal.
  • Low voltage cutoff, stops motor on low battery voltage (optional, not available on H-bridge version).
  • Variable rate PWM output to reduce noise a low speeds and increase efficiency at high speeds.
  • Programmable throttle response curves with two sample curves.
  • Slow start to protect gearboxes.
  • Brake, either hard or soft (optional).
  • Accurate throttle pulse width measurement.
  • Accurate software PWM with rates between 7.6kHz and 2kHz.
  • 64 motor speeds for smooth speed control.
In addition the following features are specific to this ESC:
  • Push-button configuration of throttle range, brake, etc.
  • Configurable brake time prior to switching to reverse, between 0 and 5 seconds.
Push-button configuration
This ESC has a push button and LED that permit the ESC to be configured. The configuration is stored in the EEPROM on the PIC and will stay set until reconfigured.
The configuration system permits the configuration of the throttle range, the brake to reverse delay, and also the disabling of the reverse function.
User's Manual
Important Note
On power up the ESC will not arm until the throttle is in the neutral position. It is possible to perform throttle configuration during this time using the configuration system (see below). The ESC also requires the throttle to be in the neutral position to rearm the ESC after:
  • Loss of receiver signal;
  • After using any of the configuration modes.




      It is almost certain that you will need to perform throttle configuration the first time that you use the ESC. This is because it is very unlikely that the factory default options in the ESC will match your radio control unit.

Status LED (Relay version)
The status LED is ON whenever the brake is active, and off at other times. The status LED is also used during configuration (see below).
Status LED (H-bridge version)
The status LED is ON whenever the ESC is in reverse, and off at other times. The status LED is also used during configuration (see below).
Configuration of the ESC
Brake to Reverse Delay
To set the brake to reverse delay period press the 'program' switch and keep it pressed for the delay period required and the release the button. When the button is first pressed the LED will start to flash on and off rapidly. The maximum delay time that can be configured is approximately 5 seconds, after 5 seconds the LED will show a short on flash and a long off flash. If the button is released during this time the maximum 5 second delay is configured.
Disable Reverse
To disable reverse in the ESC press the 'program' button and keep it pressed. At first the LED will flash on and off rapidly. Then, after about 5 seconds the LED will change to a short on flash and a long off flash, keep pressing the burron. After another 5 seconds the LED will alter to a long on flash and long off flash, now release the button.
Configure throttle
To configure the throttle first ensure that the throttle is in the neutral position.
Press the 'program' button and hold it down. At first the LED will flash on and off rapidly. Then, after about 5 seconds the LED will change to a short on flash and a long off flash, keep holding the burron down. After another 5 seconds the LED will alter to a long on flash and long off flash, keep holding the button down.
After a further 5 seconds the LED will return to flashing on and off rapidly, release the 'program' button.
The LED will continue to flash on and off rapidly. Pull the throttle to the full forward direction and hold it there for a few seconds and then return the throttle to the neutral position.
The LED will change to flashing with a long on and long off, this indicates that the forward throttle settings have been configured. Push the throttle to the full brake/reverse position and hold it there for a few seconds and then return the throttle to the neutral position.
The LED will stop flashing and the ESC's throttle settings are now configured.
Software Development Environment
This software was developed with the MPLAB IDE from MicroChip.
If you plan to use this ESC design and build one yourself you will need to download the MPLAB IDE. There are too many ESC options for all the versions to be available on this Web page. With the earlier aircraft design I provided a few 'common' versions of the software, however, with this ESC I have assumed that anyone building the ESC will select the options and assemble the code for themselves.
After you have installed the MPLAB IDE proceed as follows:
  • Create a directory somewhere on your Windows system. the MPLAB IDE does not like path names that are too long (greater than 30 characters or so) - so stick to a simple short name. For example: C:\PIC\CarESC
  • Copy the caresc.asm, linear.inc and power.inc files from the links below into your diectory.
  • Start the MPLAB IDE.
  • Select Project->Project Wizard.
  • Click Next.
  • Select 'PIC12F675' as the device, click 'Next'.
  • Select 'Microchip MPASM Toolsuite' as the Active Toolsuite, click 'Next'.
  • Enter a name for your project and then use the 'Browse' facility to set the Project Directory to the directory you created at the first step, click 'Next'.
  • Add the 3 files that you copied to the project directory to the project by double clicking each file name in the left hand pane, the files will appear in the right hand pane. Do NOT check the boxes next to the files. Click 'Next'.
  • Click 'Finish'.
  • The workspace will open and you will see a project window that shows one Source File and two Header Files.
  • You should now be able to assemble the PIC code by pressing F10 - this will produce a file called 'caresc.hex'.
  • To alter the paramaters double click on 'caresc.asm' in the project window and the assembler source will now appear in a new window, make the changes you require in this window.
  • After you have made you changes press F10 to assemble the code.
The MPLAB IDE has full support for simulation that permits you to fully check the operation of the ESC. However, the use of these facilities is beyond the scope of this document. Users who just want to build a 'custom' version by modifying standard parameters of the ESC should have no problem just using the IDE to assemble the code.
The ESC Software
The PWM Engine Generator
This ESC uses a software PWM engine that is machine generated by a Perl program. The source code for this program is available as part of the earlier aircraft ESC. Please consult the other document for details.
Main ESC module
The main ESC module contains all of the ESC application, with the exception of the PWM engine file. This source file contains a number of constants at the top that you can modify so suit your application.
Linear PWM engine
A linear (ie. throttle position proportional to percentage duty cycle) PWM include file is available that implements the 'basic' ESC.
Power PWM engine
A power (ie. throttle position proportional to engine power) PWM include file is available.
ESC Software Options
This ESC has a number of options that you can configure prior to programming the PIC. These options include:
  • Enable or disable the push button configuration option (default is enabled);
  • Select either relay or H-bridge for reverse (default is relay);
  • Enable or disable slow motor start for forward and reverse (default is fast motor start);
  • Select the brake mode as either no brake, brake on/off at 100%, brake on/off with a slow brake application (the default), or proportional brake;
  • Low voltage curoff point (default is disabled);
  • Relay changover delay (default os 0.5sec).
Prior to constucting this ESC you should review the documentation at the top of the caresc.asm source module and alter the configuration setting to produce the combination of options that you require.
Circuits
There are 2 circuits available that show the ESC in its intended configuration. One circuit uses a relay to provide the reverse functions and the other shows a sample H-bridge design.
Note: These circuits all show a single FET in each position in the curcuit. For large motor currents it will probably be the case that more FETs in parallel are required and appropriate heatsinks considered. The details of this are left to the reader.
A note about the H-bridge
The H-bridge citcuit is provided as a starting point only. It is a simple design using two P-channel FETs and two N-channel FETs. The P-channel FETS have a relativly high On resistance and in most circumstances the use of all N-channel FETs would be more appropriate. Replacing the P-channel FETs with N-channel FETs requires a more complex drive arrangement and this is not documented here.
Where is everything?
The files available for download are:

File NameDescription
caresc.asm
PIC 12F675 Assembler Source
linear.inc
PIC 12F675 Assembler Include File
power.inc
PIC 12F675 Assembler Include File
rcaresc.gif
Circuit diagram for relay reverse
hcaresc.gif
Circuit diagram for H-bridge reverse



Construction Details
There are no constuction details provided for this ESC. The example shown in the aircraft ESC can easily be adjusted for use with the relay reverse ESC. The H-bridge ESC would require a desgin that was primarily determined by the details of the H-bridge system.

原始頁面地址:vmdsoft點designsoft點com點au/ahome/rc/PIC-CarESC/



分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復

使用道具 舉報

沙發
ID:4624 發表于 2017-8-31 22:02 | 只看該作者
大神們啊,幫幫忙啊~
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

手機版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 欧美日韩久久精品 | 午夜电影福利 | 国产日韩欧美一区 | 免费国产一区二区 | 天天澡天天操 | 欧美成人a | 国产欧美精品一区二区色综合朱莉 | 亚洲精品成人在线 | 国产高清在线精品一区二区三区 | 天天干天天爱天天操 | 91精品久久久久久久久 | 欧美在线视频一区 | 亚洲视频在线观看 | 国产综合视频 | 精品一区二区三区免费视频 | 中文字幕在线观看一区 | 亚洲成人三级 | 91中文| 成人免费精品视频 | 日本成人中文字幕在线观看 | 日本成人在线免费视频 | 色精品| 国产精品久久久久久久久图文区 | 欧美h | 欧美三级成人理伦 | 久久精品视频一区二区 | 9191成人精品久久 | 99re视频在线免费观看 | 午夜影院在线观看 | 国产精品三级久久久久久电影 | 一二三四在线视频观看社区 | 欧美成人一级视频 | 一级片在线免费播放 | 亚洲午夜精品一区二区三区 | 九九热在线视频 | 久久亚洲一区二区三区四区 | 色视频免费 | 99精品久久久久久中文字幕 | 久久成人午夜 | 亚洲欧洲一区二区 | 日韩精品免费一区二区在线观看 |