Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] pic 16f630 Based 8 Chanal Remote controle

Status
Not open for further replies.

sribangaram

Full Member level 5
Joined
Apr 29, 2012
Messages
294
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,298
Location
INDIA.:/;:'" VIJAYAWADA
Activity points
3,695
Dear Friend I have to installed MPLAB but I didn't understand how to compile Please send the hex file

- - - Updated - - -

Dear Friend I have to installed MPLAB but I didn't understand how to compile Please send the hex file
 

tpetar

Advanced Member level 5
Joined
Sep 27, 2010
Messages
6,427
Helped
1,712
Reputation
3,454
Reaction score
1,677
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,376
Sribangaram my friend,

Here is instructions what you should do : https://jap.hu/electronic/pic.html

Its time to learn how to compile source code for project.

Try first to compile firmware alone in purpose of learning, if there is some problems, I will help you.

;-)
 

sribangaram

Full Member level 5
Joined
Apr 29, 2012
Messages
294
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,298
Location
INDIA.:/;:'" VIJAYAWADA
Activity points
3,695
Dear Friend I am getting this Please help ERROR
make: Makefile: No such file or directory
make: *** No rule to make target `Makefile'. Stop.

BUILD FAILED (exit value 2, total time: 63ms)
 

sribangaram

Full Member level 5
Joined
Apr 29, 2012
Messages
294
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,298
Location
INDIA.:/;:'" VIJAYAWADA
Activity points
3,695
I am trying toooomuch time but every time I am getting this errors Please help me

----------------------------------------------------------------------
Release build of project `C:\Documents and Settings\MADHU\Desktop\New Folder\enc-044.disposable_mcp' started.
Language tool versions: MPASMWIN.exe v5.34, mplink.exe v4.34
Tue Jan 08 02:54:33 2013
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Deleted file "C:\Documents and Settings\MADHU\Desktop\New Folder\enc-044.mcs".
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F628A "enc-044.asm" /l"enc-044.lst" /e"enc-044.err"
Message[301] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P16F628.INC 35 : MESSAGE: (Processor-header file mismatch. Verify selected processor.)
Error[105] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 34 : Cannot open file (Include File "mtxv4.inc" not found)
Error[149] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 36 : Directive only allowed when generating an object file
Error[149] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 45 : Directive only allowed when generating an object file
Error[149] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 52 : Directive only allowed when generating an object file
Error[118] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 55 : Overwriting previous address contents (0000)
Error[118] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 55 : Overwriting previous address contents (0000)
Error[118] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 56 : Overwriting previous address contents (0001)
Error[118] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 56 : Overwriting previous address contents (0001)
Error[118] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 57 : Overwriting previous address contents (0002)
Error[118] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 57 : Overwriting previous address contents (0002)
Error[118] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 59 : Overwriting previous address contents (0003)
Error[118] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 59 : Overwriting previous address contents (0003)
Error[118] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 59 : Overwriting previous address contents (0004)
Error[118] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 59 : Overwriting previous address contents (0004)
Message[302] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 61 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 63 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 65 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 67 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[113] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 76 : Symbol not previously defined (mtx_init)
Error[113] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 77 : Symbol not previously defined (mtx_buffer)
Error[113] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 80 : Symbol not previously defined (mtx_buffer)
Warning[224] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 86 : Use of this instruction is not recommended.
Warning[224] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 93 : Use of this instruction is not recommended.
Warning[224] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 103 : Use of this instruction is not recommended.
Error[113] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 119 : Symbol not previously defined (mtx_buffer)
Warning[224] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 127 : Use of this instruction is not recommended.
Error[113] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 130 : Symbol not previously defined (mtx_buffer)
Error[113] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 132 : Symbol not previously defined (mtx_buffer)
Error[113] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 135 : Symbol not previously defined (mtx_buffer)
Error[113] C:\DOCUMENTS AND SETTINGS\MADHU\DESKTOP\NEW FOLDER\ENC-044.ASM 137 : Symbol not previously defined (mtx_send)
Halting build on first failure as requested.
----------------------------------------------------------------------
Release build of project `C:\Documents and Settings\MADHU\Desktop\New Folder\enc-044.disposable_mcp' failed.
Language tool versions: MPASMWIN.exe v5.34, mplink.exe v4.34
Tue Jan 08 02:54:34 2013
----------------------------------------------------------------------
BUILD FAILED
 

tpetar

Advanced Member level 5
Joined
Sep 27, 2010
Messages
6,427
Helped
1,712
Reputation
3,454
Reaction score
1,677
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,376
From MPLAB output messages I will say you didnt add files into project.



Did you set parameters described on this link : https://jap.hu/electronic/pic.html

Start MPLAB-X, and select file/new project.
Select "Microchip Embedded" in Categories and "Standalone Project" in Projects.
Click next, select the target microcontroller you see in the circuit diagram (for example, PIC16F628).
Click next, ignore Select Header, and click next again.
Select "Simulator" in "Hardware Tools" as Tool.
Click next, and select "mpasm (version) for Compiler.
Click next and enter a project name.
Click Finish.
Select Window/Projects.
In the projects window, use the actual project, and ignore others (if there are any).
Right-click "Linker files", select "Add existing item" and add the linker script (*.lkr) to the project.
In the projects window, right-click "Source files", select "Add existing item" and add all assembly (*.asm) files to the project.
Right-click the actual project name and select "Build".

If asked, choose generating "relocatable code", and not "absolute code".

You will see the compilation output in the "Output window".
 

sribangaram

Full Member level 5
Joined
Apr 29, 2012
Messages
294
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,298
Location
INDIA.:/;:'" VIJAYAWADA
Activity points
3,695
Dear Friend how to add this I have only asm file what is this file Right-click "Linker files", select "Add existing item" and add the linker script (*.lkr) to the project.
 

tpetar

Advanced Member level 5
Joined
Sep 27, 2010
Messages
6,427
Helped
1,712
Reputation
3,454
Reaction score
1,677
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,376
When you make project in MPLAB you will get small window with projects files in left part of the screen. In that windows you do this, also this can be done over application menu.
 

sribangaram

Full Member level 5
Joined
Apr 29, 2012
Messages
294
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,298
Location
INDIA.:/;:'" VIJAYAWADA
Activity points
3,695
Yes Friend I can understand but I am asking their '2' files I want to add > 1: Right-click "Linker files", select "Add existing item" and add the linker script (*.lkr) to the project. which file I will select hear ? > 2: right-click "Source files", select "Add existing item" and add all assembly (*.asm) files to the project hear selecting the (*.asm) file



Friend this is very big punishment to me :lol::lol:
 

tpetar

Advanced Member level 5
Joined
Sep 27, 2010
Messages
6,427
Helped
1,712
Reputation
3,454
Reaction score
1,677
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,376
In file archive remote_control.zip given earlier in posts, you needed have files for project.

Archive file contains folders with needed files inside :

rf-transmitter

8ch-receiver

- - - Updated - - -

Maybe you have disabled showing of file extension in Windows, turn this on.
 

sribangaram

Full Member level 5
Joined
Apr 29, 2012
Messages
294
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,298
Location
INDIA.:/;:'" VIJAYAWADA
Activity points
3,695
Dear Friend that files I have to try.......... That all files are working only 4 Channel mode Please check this files Before thread #53 From that link downloaded file was TX (pic 16f628 modification).................. Next thread............. #57 that zip file TX & RX but I use RX firmware only Please check I am doing Right or Wrong ?
 

tpetar

Advanced Member level 5
Joined
Sep 27, 2010
Messages
6,427
Helped
1,712
Reputation
3,454
Reaction score
1,677
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,376
No, no I modify ASM source.

Code:
[CODE]; toggle or momentary mode, 8 channels
[B][COLOR="#FF0000"]#define MODE_CH8[/COLOR][/B]

; ON/OFF latched mode, 4 channels
[B][COLOR="#FF0000"];define MODE_CH4[/COLOR][/B]

#include <p16F630.inc>
#include <mtxv4.inc>
.
.
.
[/CODE]


By default in code 4ch is enable, 8ch is disabled. We change that to 8ch and now source should be again compiled.
 

tpetar

Advanced Member level 5
Joined
Sep 27, 2010
Messages
6,427
Helped
1,712
Reputation
3,454
Reaction score
1,677
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,376
If you want to use PIC16F628 you have file dec-043.asm (8ch-receiver folder). In this file momentary/latch is defined with LATCH_MASK bits.

Code:
#include <p16f628.inc>
#include "mrxv4.inc"

EXPIRE_TIMER	EQU 0x12
[B][COLOR="#FF0000"]LATCH_MASK	EQU B'00000000'[/COLOR][/B]
VALID_BIT	EQU 4

This configuration bits are for all momentary.
 

sribangaram

Full Member level 5
Joined
Apr 29, 2012
Messages
294
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,298
Location
INDIA.:/;:'" VIJAYAWADA
Activity points
3,695
Dear Friend Nothing change now also same ..........1 to 4 buttons are working momentary when I have to press '5 to 8' buttons just blinking RA"4" connected LED only nothing available to out put ..........Friend please check your end and send the hex file's for TX & RX I am very sorry to troubling you :sad::sad::sad:
 
Last edited:

tpetar

Advanced Member level 5
Joined
Sep 27, 2010
Messages
6,427
Helped
1,712
Reputation
3,454
Reaction score
1,677
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,376
Let try this, all 8ch should be momentary. Check ZIP files in attachment.

Hex files are inside, and they are called:

TX_8ch_mom_628.hex - For RF transmitter with PIC16F628
RX_8ch_mom_628.hex - For RF receiver with PIC16F628

Both HEX are for PIC16F628 not for PIC16F628A!
If you have PIC16F628A then source files should be recompiled for that device.




EXPLANATION FOR RECEIVER


In RX source file you need to define "latch mask" 8-bits for 8ch, if 0 then channel is momentary if 1 then channel is latch.

Example all 8ch momentary :

Code:
EXPIRE_TIMER	EQU 0x12
LATCH_MASK	EQU [B][COLOR="#FF0000"]B'00000000'
[/COLOR][/B]VALID_BIT	EQU 4


Example all 8ch are in latch mode :

Code:
EXPIRE_TIMER	EQU 0x12
LATCH_MASK	EQU [B][COLOR="#FF0000"]B'11111111'
[/COLOR][/B]VALID_BIT	EQU 4


Example only 2 channels (2ch and 6ch) are in latch mode :

Code:
EXPIRE_TIMER	EQU 0x12
LATCH_MASK	EQU [B][COLOR="#FF0000"]B'00100010'
[/COLOR][/B]VALID_BIT	EQU 4





EXPLANATION FOR TRANSMITTER


Example 8ch mode is enabled:

Code:
; toggle or momentary mode, 8 channels
#define MODE_CH8

; ON/OFF latched mode, 4 channels
[COLOR="#FF0000"][B];[/B][/COLOR]#define MODE_CH4


Example 4ch mode is enabled :

Code:
; toggle or momentary mode, 8 channels
[B][COLOR="#FF0000"];[/COLOR][/B]#define MODE_CH8

; ON/OFF latched mode, 4 channels
#define MODE_CH4



For usage MPLAB I already give you material as step by step, but I think its time to learn that. You can try to do this, if there is problem we can go step by step over email or TeamViewer.

:wink:
 

Attachments

  • RX.ZIP
    34.6 KB · Views: 26
  • TX.ZIP
    11.8 KB · Views: 21
Last edited:

tpetar

Advanced Member level 5
Joined
Sep 27, 2010
Messages
6,427
Helped
1,712
Reputation
3,454
Reaction score
1,677
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,376
Friend not available pic16f628 hear only available pic16f628A so what can I do now

From post #78 :

"If you have PIC16F628A then source files should be recompiled for that device."

:smile:







Try these HEXs with PIC16F628A.
 

Attachments

  • RX TX PIC16F628A.ZIP
    1.4 KB · Views: 28
Last edited:
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top