Что-то не удается мне нагуглить следующее… возможно я неправильно задаю вопрос
Цель - сделать дискретный сервопривод PPM на 16F629 для наземных моделей.
Нужен исходник с комментариями на PBP, чтоб я смог на его основе например управлять электродвигателем. вкл-выкл-реверс. При положениях ручки на передатчике вверх-центр-вниз. Передатчик - 4 пропорциональных канала. Двигатель должен управляется либо 2я реле, либо 4я ключами, это неважно.
Вопросы как скомпилить и как прошить МК обещаю не задавать))
’ AUX1 (pitch) two stage switch and Anti-Collusion Flasher for Lama v4
’ Servo AUX1 channel signal connected to pin 4 (Input 3)
’ Anti-collision LED connected to pin 7 (Output 0)
’ Nav Light Set connected to pin 6 (Output 1)
’ Spots/Landing Set connected to pin 5 (Output 2)
’ Use appropriate resistors for your LED strings
’ and use a 33k resistor between pin 2 (Serial In) and ground
’ for reliable operation.
’
’ At all times Anti-Collision LED’s are flashing.
’
’ On 100% pitch this will light both the nav and spot/landing LEDs
’ Between 25%-75% pitch this will only light the nav LEDs
’ Below 25% pitch this will switch off both nav and spot/landing LEDs
’
’
’ Code by Desmond Wong
’ Last updated 19/04/2009 1.55PM
’ Use at your own risk.
main: pulsin 3,1,w1 ’ Measure time between pulses
if w1 >= 166 then gosub landingon ’ If > 166 then turn on the landing lights
if w1 < 165 then gosub landingoff ’ If 125 < w1 > 165 then turn off landing lights
if w1 >125 then gosub navlightson ’ but keep nav lights on
IF W1 < 120 THEN GOSUB alloff ’ If w1 < 120 then turn off the nav lights and landing lights
gosub flasher ’ Flash the Anti-Collision lights
goto main ’ Loop back to start
flasher: high 0
nap 1
low 0
nap 2
high 0
nap 1
low 0
nap 5
return
landingon: high 2
return
landingoff: low 2
return
Нарыл управление светодиодами… буду проверять.
Эл. двигатель примастырыть к этому будет легко. Меня интересовал кусок кода где разбирается сигнал PPM.
{"assets_hash":"a8b26fa7f6e768b07a72c8c9aadb9422","page_data":{"users":{"4932fb6c3df9550077774f3a":{"_id":"4932fb6c3df9550077774f3a","hid":41327,"name":"jonison","nick":"jonison","avatar_id":null,"css":""},"49bed7803df95500777707e0":{"_id":"49bed7803df95500777707e0","hid":45526,"name":"MLT","nick":"MLT","avatar_id":null,"css":""}},"settings":{"can_see_ip":false,"can_report_abuse":false,"can_see_hellbanned":false,"forum_can_view":true,"forum_can_reply":false,"forum_edit_max_time":30,"forum_can_close_topic":false,"forum_show_ignored":false,"forum_mod_can_delete_topics":false,"forum_mod_can_hard_delete_topics":false,"forum_mod_can_see_hard_deleted_topics":false,"forum_mod_can_edit_posts":false,"forum_mod_can_pin_topic":false,"forum_mod_can_edit_titles":false,"forum_mod_can_close_topic":false,"can_vote":false,"forum_mod_can_add_infractions":false,"forum_topic_title_min_length":10,"forum_reply_old_post_threshold":30,"votes_add_max_time":168,"forum_show_post_interval":7,"can_see_deleted_users":false},"section":{"_id":"61c9a54c3df9550077bb50ba","hid":8,"title":"Самодельная электроника, компьютерные программы","parent":"61c9a54c3df9550077bb50f3","description":"Софт для моделирования и черчения, самодельные электронные устройства.","is_category":false,"is_votable":true,"is_writable":true,"cache":{"topic_count":2667,"post_count":48274,"last_post":"6757f71af9bb00ab89de832d","last_topic":"6757f71af9bb00ab89de832c","last_topic_hid":572572,"last_topic_title":"DVB-T2 для FPV видео","last_ts":"2024-12-10T08:08:58.227Z","last_user":"5b0062d13df95500776fe377"}},"topic":{"_id":"4a2640ba3df9550077973fea","hid":144306,"title":"Нужна помощь. Схема и программа(PBP) PIC16F629","views_count":2561,"last_post_counter":2,"cache":{"post_count":2,"first_post":"4a2640ba3df95500779743b3","first_ts":"2009-06-03T09:22:02.000Z","first_user":"49bed7803df95500777707e0","last_post":"4a26e3953df95500779743b5","last_post_hid":2,"last_ts":"2009-06-03T20:56:53.000Z","last_user":"4932fb6c3df9550077774f3a"},"st":1,"section":"61c9a54c3df9550077bb50ba"},"subscription":null,"pagination":{"total":2,"per_page":25,"chunk_offset":0},"posts_list_before_post":["paginator","datediff"]},"locale":"en-US","user_id":"000000000000000000000000","user_hid":0,"user_name":"","user_nick":"","user_avatar":null,"is_member":false,"settings":{"can_access_acp":false,"can_use_dialogs":false,"hide_heavy_content":false},"unread_dialogs":false,"footer":{"rules":{"to":"common.rules"},"contacts":{"to":"rco-nodeca.contacts"}},"navbar":{"tracker":{"to":"users.tracker","autoselect":false,"priority":10},"forum":{"to":"forum.index"},"blogs":{"to":"blogs.index"},"clubs":{"to":"clubs.index"},"market":{"to":"market.index.buy"}},"recaptcha":{"public_key":"6LcyTs0dAAAAADW_1wxPfl0IHuXxBG7vMSSX26Z4"},"layout":"common.layout"}