• ### Recent Forum Posts

#### Re: Calculate tuning value for the AD9850 DDS.

Here it is. It wasn't tested...

ftw var long ; unsigned long ftw; // 32-bit Frequency Tuning Word
f var long

;/************************************************************************
;...

pedja089 Yesterday, 23:33

#### Re: Confused by Arraywrite

mikes quote here is very wrong

from the manual

the inflexible way

richard Yesterday, 23:15

for control = 0 to 15
LATB.4=Control.0
LATB.5=Control.1
LATB.6=Control.2
LATB.7=Control.3
next control

pedja089 Yesterday, 22:20

Yes thanks, but how to step through the options in the most efficient way without disturbing ports B0-3

retepsnikrep Yesterday, 21:26

#### Re: Calculate tuning value for the AD9850 DDS.

Yes, in XC8 that's how you would address the "local" variables (c, f, and n) using assembly language.

Mike, K8LH Yesterday, 21:10

#### Re: Confused by Arraywrite

The ARRAYWRITE command prepends the LOOKUP or LOOKDOWN commands.

b0 VAR BYTE
b1 VAR BYTE
Letter VAR BYTE[9]
ARRAYWRITE Letter, ["SOMETHING"]
FOR b0 = 0 TO 8
LOOKUP b0, [Letter], b1

mpgmike Yesterday, 18:14

#### Confused by Arraywrite

I've looked at the examples and posts on here and they are helpful but.....

OK I have a 38x25 display.
I can talk to it using hserout and have a 1ms interrupt running so want to send it 1...

retepsnikrep Yesterday, 15:52

#### Re: Calculate tuning value for the AD9850 DDS.

Mike,
It can be almost copy/paste in PBP. I can try to sort details to work in PBP. But I don't understand what is calcFTW@c,@f,@n... Is it just variables declared in function?
Can you explain?

pedja089 Yesterday, 09:12

If you are using PIC 18F, then use simplest solution is
LATB.4=Control.0
LATB.5=Control.1
LATB.6=Control.2
LATB.7=Control.3

EDIT:
For PIC16

PortBCopy var byte

pedja089 Yesterday, 09:01

I have a HTC4067 16x1 multiplexer, it's controlled by four lines S0, S1, S2, S3
I have these all connected to Port B pins 4,5,6,7 respectively on my pic. This could be reversed to 7,6,5,4 if that...

retepsnikrep Yesterday, 08:24
• # Help

What to do and where to look if it all goes wrong !

1st and foremost, be sure to read the readme files on the install disk and in the working directory on your hard disk once the application is installed. The majority of the of the new user support questions can be solved by reading the readme files on the installation disk or in the working directory. Revisions to command functionality and bug fixes are also listed in these files, (the printed manual is updated only periodically). Most new commands are first listed in the readme files, well before any mention the manual.

PIC® BASIC is a very well documented language, several books are available (on this site!) and some excellent FREE documentation has been published by Parallax as part of their stampsinclass series.

Remember that PIC® Basic compilers are compatible with the BASIC STAMP language and syntax, so virtually any code written for the basic stamp can be compiled by PIC® BASIC (stamp1) or PIC® BASIC PRO(stamp1+2). The basic theory and principles of useing the stamp are applicable to PIC® when using PIC® Basic. Beginners should note the theory and concepts used with the BASIC STAMP when constructing their first PIC® project with PIC® BASIC or PIC® BASIC PRO.
At present general HELP is provided via the PICBASIC® Forum, this means that you must have access to the internet to be able to send and receive information related to your problem. If you have problems with installation or compilation please make use of the Forum
Both Crownhill and ME Labs monitor the PICBASIC® user Forum as do many other PICBASIC® users, the forum is a medium by which you can obtain help, hints and tips form Crownjhill melabs and the mass of existing picbasic® users, most problems are not new and other users often have the correct solutions to hand and they will often reply almost immediately.
To join the forum simly comlete the registration form found under the REGISTER button at the top right of this web page.

Remember that PICBASIC® is largely compatible with the Parallax BASIC Stamp® I and II modules, make use of the vast range of documentation published by Parallax Inc and look at the code examples on this site for ideas and solutions to your problems.