Jump to content

Recommended Posts

hey all plz i need urgent help about the steps to compile this code for pic 16f84a and get the output hex file, i need help plz it is for my senior project thanks in advance

 

 

INCLUDE "modedefs.bas"

TRISA = %00000010

TRISB = %00000000

OPTION_REG.7 = 1

'lcd define

DEFINE LCD_DREG PORTB

DEFINE LCD_DBIT 4

DEFINE LCD_EREG PORTB

DEFINE LCD_EBIT 0

DEFINE LCD_RSREG PORTB

DEFINE LCD_RSBIT 1

 

x var byte

ht var byte

sk var byte

stp var byte

bgn:

x=0

ht=0

sk=0

stp=0

low porta.0

pause 500

high porta.0

LCDOut $fe,1,"Computerized"

LCDOut $fe,$c0,"Lying Detector"

pause 1000

low porta.0

main:

serin2 porta.1,84,[ht]

if ht <> 120 then goto main

high porta.0

LCDOut $fe,1,"Thx Dr. M.Nasser Eddine"

pause 1000

low porta.0

 

get dat:

serin2 porta.1,84,[ht,sk,stp]

if stp =120 then goto bgn

ht =ht*17

LCDOut $fe,1,"Heart bt",#ht," "

LCDOut $fe,$c0,"Skin rs",#sk," "

pause 200

goto get_dat

end

 

 

 

 

 

and this code for pic 16f818

 

INCLUDE "modedefs.bas"

INCLUDE "tonne.bas"

ADCON1 =14

TRISA = %00000101

TRISB = %00011000

OSCCON = 96

OPTION_REG.7 = 1

 

sw var portb.4

sensor var porta.3

portb=0

porta=0

 

nval var byte

val var byte

dat var byte

tm var word

bt var byte

bth var byte

htb var byte

sk var byte

stp var byte

val=0

nval=0

dat=0

tm=0

bt=0

stp=0

serout2 portb.0 ,84,[0]

pause 500

sst:

if sw = 0 then

serout2 portb.0 ,84,[120]

goto bgn

endif

goto sst

 

bgn:

stp=0

low porta.3

pause 20

if sw = 1 then bgn

high porta.3

high portb.6

Sound portb.1,[F2,15,R,1,C2,7,R,1,C2,7,R,2,D2,12,R,2,C2,8,R,10,E2,10,F2,15]

 

main:

tm=0

low portb.7

low portb.5

gosub check_hb

bth =bt*17

adcin 0,sk

pause 20

serout2 porta.1,84,[bth]

pause 20

serout2 porta.1,84,[sk]

serout2 portb.0,84,[bt,sk,stp]

pause 20

serin2 porta.2,84,500,main,[dat]

if dat = 20 then

Sound portb.1 ,[106,20,112,75]

pause 20

stp=120

serout2 portb.0,84,[bt,sk,stp]

goto sst

endif

goto main

 

check_hb:

tm=0

bt=0

start:

tm=tm+1

pause 1

low portb.7

low portb.5

if portb.3 =1 then

high portb.7

high portb.5

bt=bt+1

 

loop1:

low portb.5

tm=tm+1

pause 1

if tm => 3000 then return

if portb.3 = 1 then loop1

endif

if tm => 3000 then return

goto start

Link to post
Share on other sites

zamhareers,

hey all plz i need urgent help about the steps to compile this code for pic 16f84a and get the output hex file, i need help plz it is for my senior project thanks in advance

Your program isn't in a programming language we recognise here.

 

Regards

Dave

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...