Right,
Have a 16f628a.
@ DEVICE pic16F628A, INTOSC_OSC_NOCLKOUT
@ DEVICE pic16F628A, WDT_OFF
@ DEVICE pic16F628A, PWRT_ON
@ DEVICE pic16F628A, MCLR_OFF
@ DEVICE pic16F628A,...
Type: Posts; User: Peter1960; Keyword(s):
Right,
Have a 16f628a.
@ DEVICE pic16F628A, INTOSC_OSC_NOCLKOUT
@ DEVICE pic16F628A, WDT_OFF
@ DEVICE pic16F628A, PWRT_ON
@ DEVICE pic16F628A, MCLR_OFF
@ DEVICE pic16F628A,...
Hi and thanks everyone.
Using a combination of Lookup and assembler
the code is now 3768 !!!! beauty !
I noticed that lookup can reduce code but can also
increase code, so be carefull !
...
a minor :) oversight !
The demo PIC had 8k,
final PIC ONLY 4k !
Suggestions to shrink code, please !
I have already used ASM/ENDASM where possible,
have used minimal GoSubs,
I started with 7996...
Hi Mister e
I have finally got most of it sorted.
I used the line
PBPW -p18F4320 MyProgram -ampasmwin -v
and hey presto
@ ERRORLEVEL -230
' PIC Defines
' -----------
@ ERRORLEVEL -230
@ CONFIG WDT=OFF;FSCM=OFF;OSC=INTIO2
ADCON1 = $0F
Hi Guys, Hi Melanie.
I had a problem with how to program or assemble the 18F4320, The forums kept saying, and very correctly, use MPASM.
I wnt to MPSAM and tried to assemble but it wanted a...
Looks like I need to upgrade PBP as I have only version 2.44
MPASM or MPASMWIN ?
Suggestions on which Microcode version to use or
A windows version of PBP ? (Is Microcode the windows...
Brand New Proccesor Attempt !
I am using microcode studio Pic Basic Pro.
Initial Test
@ INCLUDE 18F4320.INC
__CONFIG_CONFIG1H,_XT_OSC_1H ' This is line 21
Hit F9 (Compile)
Hi,
I looked at the bitwise functions, and the examples given in
http://www.picbasic.co.uk/forum/showthread.php?t=2783&highlight=masking
Say you want PortB.0 as Input and Rest as Outputs...
Hi,
Has anyone tried to see how accurate and stable a simple resistor capacitor oscillator would be on a PIC chip ?
I am aware that temp/tolarance etc has a part to play, but if I wanted to have...
Hi,
I am trying to control the volume of a piezo by PWM, but
not a great deal of success.
I have also tried HPWM, but the same.
Peizo operating freq 4100 hz
PIC 16F628A
Because it is for 16f628
This works
@ DEVICE pic16F628A, INTOSC_OSC
Hi,
Why wont this compile ?!
@ DEVICE pic16F628A, INTRC_OSC_NOCLKOUT
' System Clock Options
Hi Daryl,
Must have been your telepathy, as I did precicly that, ie
div32 first THEN subtract
ADCIN 7,y
Pause 100 ' adc settling
x1 = y
Page 31 4th line down in mine says
** Top 16 Bits of Multiplication
I also found the DIV32, however ?
May I inquire what you were saying, please
Pete
OK, Brain Freeze !! (At the moment I cannot even get a slope formula right !)
This is what I am trying to do
x var word [2]
ADCIN 6,x
x = x*2923-1343923
Hi,
I am using a 16F676 with a 4mhz resonator.
Have to use resonator for serial port.
Hi, Apart from NAP and SLEEP which use the watchdog as the counter,
is there a way of incrementing a counter based on the xtal clock and using as little power as possible ?
I am trying to maintain...
Thanks Mr E
Hi,
Does the I2CWrite and I2CRead commands take care of the read write bit ?
The DS1808 is a dual digital potentiometer.
The command for I2C DS1808 is
Control Bits 7,6,5,4 = 0101
Address...
Thanks Mr E,
ANSEL = 0 did the trick !
One curious thing though,
when I deleted the Transmit Defines, the program stopped working ?
Can you shed any light on it.
' Debug (Communication) Defines...
http://www.picbasic.co.uk/forum/showthread.php?t=573
Hi, I am trying to put the Melanies Comms program, designed for 16f628 in a PIC12f675.
I set the osc to external and set all the required ports as gpio.
I can see test tx signals from my pic, but...
Hi,
I would like to use a pin as both analogue and digital inputs.
1st it needs to be digital to allow ICSP, and then
2nd as a analogue input to measure battery condition.
Any suggestions...
Hi,
Do you have to use the assigned ports on a PIC to I2C ie SCLK and SDAT or can you define them ?
Peter