Continue to Site

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.

How to make HEX file of foll. code? which language is it??? pls help

Status
Not open for further replies.

autjih

Newbie level 3
Newbie level 3
Joined
Apr 26, 2013
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,314
include PIC16F873.lib
include Uart.lib
include Stirng.lib
include I2C.lib

OSC Define 20

SCL Define PORTA.0
SDA Define PORTA.1

Clk Define PORTC.7
RST Define PORTC.6

ROW1 Define PORTB.0
ROW2 Define PORTB.1
ROW3 Define PORTB.2
ROW4 Define PORTB.3
ROW5 Define PORTB.4
ROW6 Define PORTB.5
ROW7 Define PORTB.6

RXD Define PORTC.3

Prog Define PORTC.0
LED Define PORTC.1

if PROG = 0 THEN
GOTO ProgramMessage
ELSE


START:
READ, MSGLength, ShiftMSGSpeed
led = 0

RST = 1
PAUSE 500
RST = 0

DataBuffer = 0
ColPosition = 0
DataBuffer = 0
EEPROMAddress = 1

RunMessage:
IF PROG = 0 THEN GOTO ProgramMessage
LED = 0

ColPosition = ColPosition + 1
IF ColPosition = 37 THEN ColPosition = 1

I2CREAD , ( EEPROMAddress - ColPosition), [DataBuffer]
PAUSEUS 50

CLK = 1
PAUSEUS 1
CLK = 0

IF ScaleTime = ShiftMSGSpeed THEN
EEPROMAddress = EEPROMAddress + 1
ENDIF

IF EEPROMAddress = MSGLength THEN
RST = 1
PAUSE 10
RST = 0
EEPROMAddress = 1
ENDIF

OutputRowData:

IF DataBuffer = 1 THEN ROW1 = 1
IF DataBuffer = 2 THEN ROW2 = 1
IF DataBuffer = 4 THEN ROW3 = 1
IF DataBuffer = 8 THEN ROW4 = 1
IF DataBuffer = 16 THEN ROW5 = 1
IF DataBuffer = 32 THEN ROW6 = 1
IF DataBuffer = 64 THEN ROW7 = 1
PAUSEus 300
ScaleTime = ScaleTime + 1
GOTO RunMessage


ProgramMessage:

LED = 1
EEPROMAddress = 1
DataBuffer = 0

ROW1 = 0
ROW2 = 0
ROW3 = 0
ROW4 = 0
ROW5 = 0
ROW6 = 0
ROW7 = 0

Write_EEPROM:
SERIN RXD, [DataBuffer]
IF DataBuffer = 255 THEN GOTO Write_Length

If led = 1 then
led = 0
else
led = 1
endif

I2CWRITE, EEPROMAddress, [DataBuffer]
PAUSE 10
EEPROMAddress = EEPROMAddress + 1
GOTO Write_EEPROM

Write_Length:
MSGLength = (EEPROMAddress - 35)
WRITE 0,MSGLength
PAUSE 5

EEPROMAddress = 1
DataBuffer = 0
ColPosition = 0
GOTO START
END
 

Its basic language... You need mikro Basic or similar.
I have tried using mikrobasic pro for PIC but i'm gettin sayin ' File "PIC16F873.mbas" not found ' at first line........... I have also tried using picbasic pro in mplab and i'm gettin error as'Bad variable modifier: .lib'. PLS help.
 

You have others files used in include??? Or documents / info???

Maybe the way is convert to other basic or c or asm language!!!
 
Last edited:

You may correct your code to new compiler for right grammar . I'm not sure QBasic interp. suit for this job because one for PC usage.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top