• ### 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
• # I2C

### PIC as I2C Master/Slaves

by Published on - 13th February 2011 18:15  Number of Views: 6141

Here is a fairly full-featured interrupt-driven I2C slave. ( The master part is easy).
This slave relies on the work ...

### Using the TMP100 series of I2C temperature sensor from Texas Instruments

by Published on - 21st September 2010 16:30  Number of Views: 6032

Here is bits and pieces of code to help in interfacing a TMP100 series temperature sensor to your PIC project! They are ...

### I2C Slave with a PIC

by Published on - 2nd July 2010 15:55  Number of Views: 7310

This code was developed from Aratti's example located here: http://www.picbasic.co.uk/forum/show...0366#post70366 ...

### Serial EEPROM Part #1

by Published on - 27th May 2010 02:01     Number of Views: 4804

This is an effort to help users understand how the I2C command works by comparing it with SHIFTIN/SHIFTOUT. A serial EEPROM, 24FC1025 will be used in the example.

...