• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

INCLUDE syntax

Not open for further replies.


Well-Known Member
file won't load??
Device = 18F1320
Clock = 8 // 8MHz clock
Include "timermodule4.bas"
tried checked spelling etc.
in the timer module4 it has another sub file as well
// [email protected] 8MHz - they are just used here for clarity...
Device = 18F1320
Clock = 8

Include "ISRTimer.bas"
can I do this or do I need to put the INCLUDE only on one bas file? not two as I have it.


New Member
Forum Supporter
Usually when the include file is in "quotes" like that then the file must reside in the same directory as the source file which references it. Either that, or you can specify the full path to the file.
When the include file is in <brackets> created by the greater/lesser than symbols the file should reside in the include directory specified by the compiler configuration.
What compiler are you using?


Well-Known Member
using swordfish

I really want to do this as a module but I might find it easier to just copy n paste?
I put the module in same directory as the ISRtimer figuring it should load.
strike 2!
will play with it as it is a learning experience.


Well-Known Member
I looked at the ISRtimer module

first code was MODULE
I tried doing same on my module but it didn't like it??
something missing when creating a module. What I havn't found out as yet.
been trying different things.
next thing I need is to have a way to make an OR statment.
have pin 9 (connected to PIR, triggers on LOW) then another pin that changes state. both pins trigger the PIC but pin 9 is disabled during daylight.
plan is a photo transistor connected to pin 9.
see schematic.
idea is the photo transistor disables the pin 9 during daylight and at night the PIR takes over and the timer is disabled.



Well-Known Member
Most Helpful Member
My 2c on includes, I believe that if you save the file in the same directory (folder) as your main file it will work.

If you put it in the Library folder it will work.

If you put it in the UserLibrary folder it will work.



Well-Known Member
Mike your right on all three that is if it's a module. One file he is trying to use is not it's the
sample code. Can't use it as module.
The timermodule4.bas was the name I think of the sample I posted. It used sordfish timer
Last edited:


Well-Known Member
I put in same folder=library

it still came up with not a valid module.
How does one make a module??
I tried putting MODULE at the beginning but it still did not reconize as a module.
Not open for further replies.

Latest threads

EE World Online Articles