• ### 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
• # MELabs PICBASIC

PICBASIC PRO™ Compiler 3.0 PBP is a BASIC programming language for Microchip's PIC microcontrollers.

Version 3 is a major evolution of this popular product, making it even more capable, stable, and reliable. All the years of development culminate here, with many new capabilities and improvements. Come see why thousands of engineers, educators and hobbyists have depended on PBP for more than a decade.
• Supports more than 500 microcontrollers.
• Newly revised 300-page manual.
• MPLABX compatible

Software activation keys are delivered electronically after purchase.
15 Day Trial Before Activation Key is Required

If installed without an activation code, the software will be fully functional for 15 days.

PBP 3.0 Gold Edition
Price: £171.94
Supports more than 500 devices.
 PBP 3.0 Silver Edition Price: £76.40 Supports Mid-Range devices.
PBP 3.0 Experimenter Edition
Price: £31.82
Supports 16F886, 18F2550, 18F25K20, and 18F25K22.
PBP Manual and CD
Price: £19.07
Printed Reference Manual and Installation CD.

Number of computer installations allowed 3
(May be uninstalled and moved. License is for single user.)
Number of computer installations allowed 3
(May be uninstalled and moved. License is for single user.)
Number of computer installations allowed 1
(May be uninstalled and moved. License is for single user.)
Maximum supported clock frequency 64Mhz
Maximum supported clock frequency 20Mhz
Maximum supported clock frequency 64Mhz
Compatible with Amicus18 Development System Compatible with Amicus18 Development System A perfect companion to the Amicus18 Development System

### What is PBP?

PBP is a BASIC programming language for Microchip's PIC microcontrollers.

It has evolved over the span of 15 years, making it the industry standard in its field. It has become a professional-level development tool for embedded programmers, though it retains the easy-to-learn syntax that makes it popular among experimenters and educators worldwide.
...

### Compare Editions

PBP3 is available in THREE editions, Chose the right one for YOU!. From Experimenter - enough for the hobbyist through Silver & GOLD - strong enough for a Pro. Including commercial licenses and annual update packages.
...

### Technical Information

PBP is a mature BASIC compiler for Microchip's PIC microcontrollers. Its licensed user base of 10,000+ is composed mostly of engineers and companies. It is intended to be a professional development tool, though its painless syntax also makes it a favorite among hobbyists and institutions of learning.

PBP generates Assembly language that consists of hand-tuned macros and library routines. This laborious approach in development makes for extreme efficiency in handling operations with a variety of variable types. Each math and comparison operation is generated according to the specific variable types that are used as inputs and output. High-level commands are included as library routines that are reused to minimize code space consumption, and these routines are tuned based on the device's memory characteristics and selected oscillator frequency.
...

### Features

PICBASIC PRO™ Compiler 3.0
• Familiar BASIC syntax
• IF (condition) THEN / ELSE / ELSEIF /ENDIF
• SELECT CASE
• FOR… NEXT
• DO WHILE/UNTIL
...

### MicroCode Studio Plus 5.0

MicroCode Studio Plus 5.0 (compatible with PBP 3.0 or later)
The main editor provides full syntax highliMicroCode Studio Plus is a powerful, visual Integrated Development Environment (IDE) with In Circuit Debugging (ICD) capability designed specifically for PICBASIC PRO™ Compilerghting of your code with context sensitive keyword help and syntax hints. The code explorer allows you to automatically jump to include files, defines, constants, variables, aliases and modifiers, symbols and labels, that are contained within your source code. Full cut, copy, paste and undo is provided, together with search and replace features.
...

...

### Product Activation

When installed PBP3 will operate in trial mode for 15 days, we recommend that you TRY PBP3 BEFORE you buy PBP3. Be sure that you are happy with the product and the facilities it offers

After purchasing your PBP3 license, the product may be activated by entering the activation key as prompted by the application, this process should be carried out whilst your host machine has access to the internet. Activation requires that the machine can contact the melabs activation service.
...