PDA

View Full Version : Temporary central repository of Darrel Taylor's works (including Mr E's Multicalc)



Darrel Taylor
- 26th December 2003, 23:22
Scroll down to this post for a list of ZIP files:
http://www.picbasic.co.uk/forum/showthread.php?t=19638&p=130286#post130286

Darrel's site is down so his links no longer work. Some can be found at the archive:

14 bit: http://web.archive.org/web/20120110012712/http://darreltaylor.com/DT_INTS-14/intro.html

18 bit: http://web.archive.org/web/20100920151949/http://darreltaylor.com/DT_INTS-18/home.html
------------------------------------------------------------------------------------------------------------

Elapsed Timer Demo

Attached to this post is a Zip file that contains a "Drop-In" elapsed timer that uses Timer1 and interrupts. It's waaay down there at the bottom of all this dribble. This may get rather long winded, so my first suggestion is to scroll down to the bottom of this post and check out the file then come back and read this post later.

--------------------- ----------------------- -----------------------------
The files contained in the Zip are:

Test_Elapsed_SER.pbp ' Demo of Elapsed Timer using serout2 command and HyperTerminal
Test_Elapsed_LCD.pbp ' Demo of Elapsed Timer using an LCD
Elapsed.bas ' Elapsed Timer include file
ASM_INTS.bas ' Assembly language Interrupt Stubs

Note: These files are intended to be used on 14-bit core PICS (12F, 16C and 16F) that have a TIMER1 module.
Note2: They are written for use as the only interrupt in the program. If you need to use other interrupts as well, the program will have to be modified before it will work.
Note3: It will NEVER work in conjunction with PBP's ON INTERRUPT statement.

In it's simplest form, this is all it takes to use the Elapsed Timer:

Include "Elapsed.pbp"
Gosub ResetTime ' Reset Time to 0d-00:00:00.00
Gosub StartTimer ' Start the Elapsed Timer

This will create a Clock counting at 1/100 seconds. It runs in the background of PBP without any other program intervention required.

The time is kept in the variables:

Ticks var byte ' 1/100th of a second
Seconds var byte ' 0-59
Minutes var byte ' 0-59
Hours var byte ' 0-23
Days var word ' 0-65535
The time can be easily displayed with a single line:

LCDout $FE,2, dec Days,"d-",dec2 Hours,":",dec2 Minutes,":",dec2 Seconds

For each of the variables (Seconds, Minutes, Hours and Days) there is a flag that indicates when the value of that variable has changed.
The Flags are:

SecondsChanged var bit
MinutesChanged var bit
HoursChanged var bit
DaysChanged var bit
So, if you wanted to display the time like a clock, you could wait until SecondsChanged = 1, display the time, then reset the flag.

Loop1:
if SecondsChanged = 1 then
LCDout $FE,2, dec Days,"d-",dec2 Hours,":",dec2 Minutes,":",dec2 Seconds
SecondsChanged = 0
endif
Goto Loop1

If you only wanted to display the time each minute instead of every second just do the same thing using the MinutesChanged flag.

Loop1:
if MinutesChanged = 1 then
LCDout $FE,2, dec Days,"d-",dec2 Hours,":",dec2 Minutes<br> MinutesChanged = 0
endif
Goto Loop1

The timer can be Stopped and Started, like a stopwatch.

Gosub StopTimer
Gosub StartTimer

--------------------- ----------------------- -----------------------------
The Elapsed.bas include file also Includes another file, ASM_INTS.bas This file can also be used in your other programs as well. It handles the "Context Saving" that is required for any Assembly language interrupt.

It contains 2 macros:
INT_START
Saves the W, STATUS, PCLATH and FSR registers. This can be used at the beginning of your Interrupt routine.

INT_RETURN
Restores the W, STATUS, PCLATH and FSR registers after the Interrupt routine is finished and then returns from the Interrupt (RETFIE).

Using it in a normal Assembly language interrupt might look something like this:


Define INTHAND INT_CODE ' Tell PBP Where the code starts on an interrupt
ASM
INT_CODE
INT_START ' Save Context
... Your Interrupt routine goes here ...
INT_RETURN ' Restore Context
EndAsm


Well, I guess that covers most of it. if I've missed anything, or you still have questions, please don't hesitate to ask.

Happy holidays,

Darrel Taylor
- 7th December 2005, 07:33
Here's the version for 18F's.

It should be a drop-in replacement for the old version. Everything works the same, except for the registers saved on entry to the INT routine.

So, you can still use the Test_Elapsed_LCD/SER.bas demo's from the original version for testing. Just add the "-18" to the INCLUDE line.
<br>

mister_e
- 7th February 2006, 04:18
Here's a simple INCLUDE file wich allow to scan any matrix KeyPad format on any PORT you decide. Yeah i know, a bit code hungry but simple to use and it's free...

The defaults setings are
Keypad ROW are connected to PORTB<3:0>
Keypad COL are connected to PORTB<7:4>
Debounce delay = 200 mSec
No auto-repeat
Keypad type 4X4


Code example using the default setting


INCLUDE "KeyPad.bas"
myvar var byte

start:
@ READKEYPAD _myvar
hserout ["Key=",dec myvar,13,10]
goto start


NOT MUCH!
If you decide to change default settings, here's the DEFINEs list

DEFINE KEYPAD_ROW 4 ' 4 ROW keypad
DEFINE KEYPAD_ROW_PORT PORTB ' ROW port = PORTB
DEFINE KEYPAD_ROW_BIT 4 ' ROW0 = PORTB.4
DEFINE KEYPAD_COL 4 ' 4 COL keypad
DEFINE KEYPAD_COL_PORT PORTB ' COL port = PORTB
DEFINE KEYPAD_COL_BIT 0 ' COL0 = PORTB.0
DEFINE KEYPAD_DEBOUNCEMS 200 ' debounce delay = 200 mSec
DEFINE KEYPAD_AUTOREPEAT 1 ' use auto-repeat feature
When using the auto-repeat feature, the delay is the debounce delay (DEBOUNCEMS)

Code example #2: Using a 8X4 keypad


INCLUDE "KeyPad.bas"

'
' Hardware connection
' ===================
DEFINE KEYPAD_ROW 8 ' 8 row
define KEYPAD_ROW_PORT PORTB ' on PORTB
DEFINE KEYPAD_ROW_BIT 0 ' <7:0>
DEFINE KEYPAD_COL 4 ' 4 col
DEFINE KEYPAD_COL_PORT PORTA ' on PORTA
DEFINE KEYPAD_COL_BIT 0 ' <3:0>
DEFINE KEYPAD_DEBOUNCEMS 200 ' debounce delay = 200 mSec
define KEYPAD_AUTOREPEAT 1 ' use auto-repeat

'
' Serial Communication definition
' ===============================
DEFINE HSER_TXSTA 24h ' enable transmit, BRGH=1
DEFINE HSER_SPBRG 129 ' 9600 Bauds

'
' Variables definition
' ===================
myvar var byte

' ---------------------------------[Program Start]----------------------------------------------
start:
@ READKEYPAD _myvar
hserout ["Key=",dec myvar,13,10]
goto start


It set the according TRIS register for you everytime you call the MACRO.. kinda bullet-proof

Everything is explain in the attach file... don't forget to rename it :)

Darrel Taylor
- 7th February 2006, 07:03
This is a series of include files that simplify the process of creating interrupt driven programs for PicBasic Pro. MPASM required.

Once you try this, you may never use ON INTERRUPT again.

Features:
Assembly language Interrupts
Basic language Interrupts
Both ASM and Basic interrupts in the same program
Service Multiple Interrupt sources
Prioritized execution order
Very easy to use


No ON INTERRUPT "Code Bloat"
No ON INTERRUPT " I'll service your interrupt whenever I feel like it." mentality.
.
One of the best things about this system, is that you don't have to remember where all the Enable bits and Interrupt flags are located.

Each interrupt "source" is given a unique name that is used to reference it.
The system "Looks Up" the correct bit locations for that name. Reducing those RTFM sessions to a minimum.
The following table lists the Named Interrupts.
Note: More interrupts have been added .. please visit http://darreltaylor.com/DT_INTS-14/intro.html

Available Interrupt Sources 14-bit
INT_INT -- INT External Interrupt
RBC_INT -- RB Port Change Interrupt
TMR0_INT -- TMR0 Overflow Interrupt 16F
TMR1_INT -- TMR1 Overflow Interrupt
TMR2_INT -- TMR2 to PR2 Match Interrupt
TX_INT -- USART Transmit Interrupt
RX_INT -- USART Receive Interrupt
CMP_INT -- Comparator Interrupt
EE_INT -- EEPROM/FLASH Write Operation Interrupt
BUS_INT -- Bus Collision Interrupt
PSP_INT -- Parallel Slave Port Read/Write Interrupt
AD_INT -- A/D Converter Interrupt
SSP_INT -- Master Synchronous Serial Port Interrupt
CCP1_INT -- CCP1 Interrupt
CCP2_INT -- CCP2 Interrupt

Here's a simple example of toggling an LED using the external interrupt (INT). (Hello World)

LED1 VAR PORTB.1

INCLUDE "DT_INTS-14.bas" ' Base Interrupt System
INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts

ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler INT_INT, _ToggleLED1, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor

INT_ENABLE INT_INT ; enable external (INT) interrupts
ENDASM

Main:
PAUSE 1
GOTO Main

'---[INT - interrupt handler]---------------------------------------------------
ToggleLED1:
TOGGLE LED1
@ INT_RETURN
Code Size = 234 words

This project, and it's associated files, have been moved.
Please download them from my website.
DT_INTS-14 (12F-16F)
http://darreltaylor.com/DT_INTS-14/intro.html

DT_INTS-18 (18F)
http://darreltaylor.com/DT_INTS-18/home.html

.

Darrel Taylor
- 7th February 2006, 07:16
The ultimate overkill Blinky Light program ... using Timer 1


LED1 VAR PORTB.1

INCLUDE "DT_INTS-14.bas" ' Base Interrupt System
INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts

ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler TMR1_INT, _ToggleLED1, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
ENDASM

T1CON = $31 ; Prescaler=8, TMR1ON
@ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts

Main:
PAUSE 1
GOTO Main

'---[TMR1 - interrupt handler]--------------------------------------------------
ToggleLED1:
TOGGLE LED1
@ INT_RETURNCode Size = 240 words

OK, Why? ... You might ask.
Well, for one, this Blinky Light program will continue Blinking at the same rate, no matter what else you add to the Main: program loop. Try doing that with pauses.

Darrel Taylor
- 7th February 2006, 08:01
The NEW Elapsed Timer does, ... well .. it does exactly the same thing as the old Elapsed Timer (http://www.picbasic.co.uk/forum/showthread.php?t=190). But now it works with the Instant Interrupt system. Which means that you can use many other interrupts in the same program without much trouble at all. Unlike the last version.

Here's an example of just the Elapsed Timer by itself.

INCLUDE "DT_INTS-14.bas"
INCLUDE "ReEnterPBP.bas"
INCLUDE "Elapsed_INT.bas" ; Elapsed Timer Routines

ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler TMR1_INT, _ClockCount, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor

INT_ENABLE TMR1_INT ; Enable Timer 1 Interrupts
ENDASM

GOSUB ResetTime ' Reset Time to 0d-00:00:00.00
GOSUB StartTimer ' Start the Elapsed Timer

Main:
IF SecondsChanged = 1 THEN
SecondsChanged = 0
LCDOUT $FE,2, DEC Days,"d-",DEC2 Hours,":",DEC2 Minutes,":",DEC2 Seconds
ENDIF
GOTO Main Code Size = 537 Words

This will create a Clock counting at 1/100 seconds. It runs in the background of PBP without any other program intervention required.

The time is kept in the variables:

Ticks var byte ' 1/100th of a second
Seconds var byte ' 0-59
Minutes var byte ' 0-59
Hours var byte ' 0-23
Days var word ' 0-65535 The time can be easily displayed with a single line:
LCDout $FE,2, dec Days,"d-",dec2 Hours,":",dec2 Minutes,":",dec2 Seconds
For each of the variables (Seconds, Minutes, Hours and Days) there is a flag
that indicates when the value of that variable has changed. The Flags are:

SecondsChanged var bit
MinutesChanged var bit
HoursChanged var bit
DaysChanged var bit

If you wanted to display the time like a clock, you could wait until
SecondsChanged = 1, display the time, then reset the flag.


Loop1:
if SecondsChanged = 1 then
LCDout $FE,2, dec Days,"d-",dec2 Hours,":",dec2 Minutes,":",dec2 Seconds
SecondsChanged = 0
endif
Goto Loop1
If you only wanted to display the time each minute instead of every second
just do the same thing using the MinutesChanged flag.


Loop1:
if MinutesChanged = 1 then
LCDout $FE,2, dec Days,"d-",dec2 Hours,":",dec2 Minutes
MinutesChanged = 0
endif
Goto Loop1

The timer can be Stopped and Started, like a stopwatch.

Gosub StopTimer
Gosub StartTimer

Darrel Taylor
- 7th February 2006, 09:37
So far I've shown one interrupt source being used at a time, but as I said in the first post, you can easily service Multiple Interrupt Sources. &nbsp; So what if we wanted to join the previous 3 examples into one program. &nbsp; NOT a problem!

To add more interrupt "Handlers", simply add them to the INT_LIST, and create a subroutine for them.

Since both the Blinky Light, and Elapsed Timer used TMR1, lets move the Blinky Light over to TMR0. Elapsed will still use TMR1.


LED1 VAR PORTD.0
LED2 VAR PORTD.1

INCLUDE "DT_INTS-14.bas" ' Base Interrupt System
INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts
INCLUDE "Elapsed_INT.bas" ' Elapsed Timer Routines

ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler INT_INT, _ToggleLED1, PBP, yes
INT_Handler TMR0_INT, _ToggleLED2, PBP, yes
INT_Handler TMR1_INT, _ClockCount, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor

INT_ENABLE INT_INT ; enable external (INT) interrupts
INT_ENABLE TMR0_INT ; enable Timer 0 interrupts
INT_ENABLE TMR1_INT ; Enable Timer 1 Interrupts
ENDASM

OPTION_REG = OPTION_REG & $80 | 1 ; Set TMR0 Prescaler to 256, leave RBPU alone
GOSUB ResetTime ' Reset Time to 0d-00:00:00.00
GOSUB StartTimer ' Start the Elapsed Timer

Main:
IF SecondsChanged = 1 THEN
SecondsChanged = 0
LCDOUT $FE,$C0, DEC Days,"d-",DEC2 Hours,":",DEC2 Minutes,":",DEC2 Seconds
ENDIF
GOTO Main

'---[INT - interrupt handler]---------------------------------------------------
ToggleLED1:
TOGGLE LED1
@ INT_RETURN

'---[TMR0 - interrupt handler]-------------------------------(Blinky Light)------
T0Count VAR WORD
ToggleLED2:
T0Count = T0Count + 1
IF T0Count = 512 THEN T0Count = 0 : TOGGLE LED2
@ INT_RETURN
<font size=-2>Code Size = 711 Words</font>

Now we have all three interrupt sources working together in the same program.
LED1 responds to the external INT
LED2 flashes, timed by TMR0
and, the elapsed timer is maintained via TMR1
And, all of this is happening behind the scenes of your normal PBP program.

Darrel Taylor
- 10th February 2006, 12:55
<table cellpadding=6><tr><td valign=center>http://www.darreltaylor.com/files/INT_Layers_asm.gif</td><td>The Instant Interrupt System consists of several "Layers".

The Bottom Layer is "DT_INTS-14.bas". This file contains everything required to use Interrupts at the ASM level. &nbsp; It handles all of the "Context Saving/Restoring", detects which interrupt has been triggered, and calls the appropriate "User Routine".

The next layer up is created from the INT_LIST macro you define in the program. &nbsp; It defines the Interrupt sources to use and the corresponding subroutines that will be called. &nbsp; They can be either simple subroutines, or complete "Modules" in a separate Include file, like the Elapse Timer. &nbsp; Up to 14 separate INT_Handler's can be in the LIST.

And, the Top Layer is the normal PBP program that runs in the foreground.

If Basic Laguage interrupts are not being used, then DT_INTS-14.bas is the only file you need to include.</td></tr></table>Here's another example of a Blinky Light program using TMR1 with an Assembly Language Interrupt handler


LED1 VAR PORTD.0
LOW LED1 ; Set to Output Low

INCLUDE "DT_INTS-14.bas" ; Base Interrupt System

ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler TMR1_INT, ToggleLED1, ASM, yes
endm
INT_CREATE ; Creates the interrupt processor

INT_ENABLE TMR1_INT ; Enable Timer 1 Interrupts
ENDASM

T1CON = $31 ; Prescaler=8, TMR1ON

Main:
PAUSE 1
GOTO Main

'---[TMR1_INT - interrupt handler]------------------------------------------
ASM
ToggleLED1
btfsc _LED1
goto $+3
bsf _LED1
goto $+2
bcf _LED1
INT_RETURN
ENDASM
<font size=-3>Code Size = 104 Words</font>

Notice that the INT_Handler's Type is ASM, and the Label does not have an underscore before it.<hr><table cellpadding=6><tr><td>http://www.darreltaylor.com/files/INT_Layers_pbp.gif</td><td valign=top>By using this type of Layering scheme. It allows us more flexability, depending on the type of interrupt we want to use. &nbsp; If we want to add Basic Language Handlers, all we need to do is Include "ReEnterPBP.bas", and it will insert another Layer in-between the Base and the Handlers.

With this layer included, you can have any combination of ASM and PBP interrupts in the same program</td></tr></table>
<br>

Darrel Taylor
- 10th February 2006, 13:51
October 05, 2002 was a good day. &nbsp; Because that's the day that Tim Box released his "INT_CTRL.pbp" program. &nbsp; The original "Instant Interrupts"

Tim had discovered that the only reason you couldn't use Basic statements in a normal interrupt, was because the PBP system variables currently being used by the statement that got interrupted, would be overwritten by the Basic statements in the interrupt routine. &nbsp; And that, all you have to do is save the state of the system vars at the start of the interrupt, and restore them back to the way they were before exiting the interrupt and you can use any Basic statements you want.

I've probably said it too many times already but ... Thanks again Tim!
<hr>
ReEnterPBP.bas is an adaptation of the same concept, but it allows the Interrupt system to determine if it needs to save the variables or not.

For instance, if you have a program with both ASM and PBP interrupt handlers, and an interrupt triggers an ASM handler, there's no need to save the variables first, it would just be waisting valuable time. And if more than 1 Basic handler is triggered at the same time, it only saves the variables once, and processes all the Interrupts on the same pass, before restoring the system vars, again saving time.

However, it does still take a lot of time to save all those variables. Usually it takes around 70 instruction cycles to save the vars. Then another 70 cycles to restore them again. At 4mhz it's 140us total save and restore time, which limits the maximum interrupt frequency to just over 7khz. At 20mhz OSC, you can go up to almost 36khz. That's fast enough to receive RS232 at over 250Kbaud with the USART. &nbsp; But is still considerably slower than you can get with ASM interrupts.

<br>

Darrel Taylor
- 11th July 2006, 11:20
<table><tr><td>http://www.darreltaylor.com/files/Fireworks_5.gif</td><td>
At long last.

The Instant Interrupt system for 18F PIC's is now available.

It's become increasingly harder to keep things up to date here on the forum, so I've moved everything over to my website.
I'm still working on some of the pages, but everything you need is already there. It seems to take longer to make the web pages, than it does to write the program. :)

http://darreltaylor.com/DT_INTS-18/home.html</td></tr></table>

<br>

Darrel Taylor
- 27th July 2006, 08:38
Interrupts and the MCSP debugger, don't get along together very well.

You should use DISABLE DEBUG before any interrupt routines, Including the Handlers.

Then ENABLE DEBUG after them.

It is possible to save the debugger variables in the same way as ReEnterPBP, but it's a waste of space when not debugging, so I didn't include them

HTH,
&nbsp; DT

Darrel Taylor
- 7th September 2006, 06:47
Hi ozion,

First rule of interrupts, Never Wait for anything.

Interrupt handlers should execute as fast as possible, and exit as soon as possible.

With 18F's you can get away with using HSERIN/HSEROUT with Waits and Pauses, by putting them in a LOW priority interrupt handler. But with the 16F's, you don't have that option.

If you want to use interrupts to receive serial data on 16F's, then you should only grab 1 byte at a time then exit. You can keep track of how many bytes have been received and set a Flag when finished so that it can be dealt with in the Main loop. Then you can HSEROUT to your hearts content.

Otherwise, do all the serial stuff in the main loop, RX and TX. The main loop should run fast enough to catch everything. And the interrupts will continue on like they should.

HTH,
&nbsp; Darrel

Darrel Taylor
- 2nd October 2006, 01:19
Ok Willem,

Well, I decided to forget about the things I should have done this weekend, and went ahead and re-wrote the SPWM program to work with the Instant Interrupt system.

I've added a few things, and it works a little different this time around. So, be sure to look close at the example.

It'll work with either the 18F or 14-bit versions, even though I only put it in the DT_INTS-14 section for now.

SPWM_INT
http://www.darreltaylor.com/DT_INTS-14/SPWM.html

Enjoy,

mister_e
- 7th November 2006, 15:33
MULTICALC


Hi all,
Few times ago i did this little utility to help in Timer, Usart, Eusart and PWM calc. It have been tested by some user here and there. Thanks to them ;)

'till now, it's seems to be bug free. It assume a minimum of knowledge on your side so far.

I plan to do another version wich will be more complete. It will include more code generation tool. It's still a work in progress but once i'm fixed on the whole idea, i'll post a Trial version.

It will create code for PBP, Swordfish and probably some other compiler.

You have to know it's a tedious job to read all datasheet and be sure everything is correct. For this reason, there's no release date.

Any wish, comments, suggestions are welcome.

Enjoy!


EDIT: Mister Es site is down, get v1.3.1 down at Alain's post:
http://www.picbasic.co.uk/forum/showthread.php?t=19638&p=130267#post130267

mister_e
- 31st December 2006, 01:52
Hi all,
Since the USB stuff is coming more and more popular, and as we see more and more questions, i decided to post my little contribution.

OK OK You already asked... but i'm in a good moon today, so let me believe it never been asked before ;)

The whole thing will use a PIC18F4550 and a 4MHz crystal + few Leds, 2 trim pot... you should be able to figure this out easy.

There we go, here's the PC interface,


<img SRC="http://www.mister-e.org/Pics/USBDemo.JPG">

Sounds good eh?

With this you can
play with both CCP (PWM) duty cycle and show it on 2 leds attach to your PIC CCP i/o (PORTC.1, PORTC.2)
modify each PORTB bits status as you wish.


You can also
see the results of AN<1:0> ADC results in the progress bars
monitor the status of those push-buttons attach to PORTA<5:2> inputs (with pull-down resistors)
receive text string
Display your VendorName and ProductName.

So almost everything EASY will be covered in both code.

I tried to stay away of the cryptic-fashioned coding but i couldn't resist to use some macro etc etc. Eh, maybe you'll learn from it? Who knows?

In attachment, you'll find ALL FILES. PBP source code and VB6 source code AND a ready to run USBDemo.exe file. Everything is hardly commented so, read it carefully... it won't hurt!

The original folder was c:\PBP_PROG\USBDemo but it shouldn't cause any problem... well i guess. If so, you know where to send them.

NOTE: If you're going to use LONG variables, you MUST copy the PIC18Xxxxx.BAL file in your source directory as well, unless you'll receive some compilation errors.

The .BAL file is located in \PBP\USB18 directory.

Those who want to use PIC18F2455, 18F2550, have a look at post 99.
http://www.picbasic.co.uk/forum/showpost.php?p=38468&postcount=99


Enjoy!

Darrel Taylor
- 7th January 2007, 06:17
Steve,

I got my parts in for USB (gotta love ebay), and I've built up a breadboard with a 4550 and LED's, switches etc.
I've looked at the example from post #143, the second one, with DT_INTS, and found two problems. The ...

INTCON = %10100000 ' Enable global and TMR0 interrupts

was causing the TMR0 interrupts to start servicing the USB before it was initialized. DT_INTS handles all the interrupt enable bits, so you don't need it anyway.

The other problem was ...

goto skipmacro

was skipping over the interrupt defintion. That section of code needs to execute so that it can handle the enable bits and setup a couple other variables.

Once I made those changes, the program works as expected, and never looses connection.
<hr>
But here's the good part, :cool:

After going through the USB18.ASM file and seeing how things worked, it soon became apparent that those routines are setup to use the USB interrupts(even though PBP doesn't use them that way). It just needs a "kick-start" to get it going. The "kick-start" is simply a tight loop servicing the USB until the driver gets to the "CONFIGURED_STATE". After that it takes off and handles itself.

But the best part is that it doesn't use ANY PBP system variables to service the USB. So the whole thing can be treated like ASM interrupts, and tied directly into the USB_INT interrupt.

This also seems to improve the response time since it can react immediately to each step of the USB protocol, instead of after each interval of the timer, or whenever ON INTERRUPT get's around to it, but I don't have any hard data to back that up yet.

Here's your PIC program from the [USBDemo, something to learn USB a little bit (http://www.picbasic.co.uk/forum/showthread.php?t=5418)]thread /.zip file.
Modified to use DT_INTS-18 and the USB interrupt.
All the other files are the same.

http://www.darreltaylor.com/files/USBDemo2_DT.txt

Works great with the "Mister E USBDemo" program.
<br>

mister_e
- 16th May 2007, 12:23
O.K. the original code was for a 4550. You need to rebuild the project in EasyHid for a 2550. There's a load of needed files.

I've uploaded the 2455 and 2550 stuff here. let me know what happen now. The 2550 have been tested... but i don't have any handy 2455.

I've also uploaded the schematic, if some need it.

NOTE: If your going to use LONG variables, you MUST copy the PIC18Xxxxx.BAL file in your source directory as well, unless you'll receive some compilation errors.

The .BAL file is located in \PBP\USB18 directory.

Darrel Taylor
- 3rd September 2007, 06:39
This has come up several times, and likewise, I've tried to approach it several times...

After a 6 month pause from working on it, suddenly all my problems were staring me right in the face, leaving me to wonder ... "What the Hell was I thinking!" Or, maybe Not thinking. :o

After fixing the now obvious mistakes ...
Finally, "A Winner!" :D

Here's a viable solution to ...

"How do I scatter the pins of the LCD data bus across multiple ports with PicBasic Pro?"

First, let me show you what a sample program might look like...
;----[ Change these to match your LCD ]---------------------------------------
LCD_DB4 VAR PORTA.0
LCD_DB5 VAR PORTB.3
LCD_DB6 VAR PORTB.7
LCD_DB7 VAR PORTC.1
LCD_RS VAR PORTD.4
LCD_E VAR PORTA.1
LCD_Lines CON 2 ' # of Lines on LCD, 1 or 2 (Note: use 2 for 4 lines)
LCD_DATAUS CON 50 ' Data delay time in us
LCD_COMMANDUS CON 2000 ' Command delay time in us
INCLUDE "LCD_AnyPin.pbp" ; *** Include MUST be AFTER LCD Pin assignments ****

;----[ Your Main program starts here ]----------------------------------------
LoopCount VAR WORD
PAUSE 500 : LCDOUT $FE,1 : PAUSE 250 ; Initialize LCD (You may not need this,
; but some displays are picky)

Main:
LCDOUT $FE,1 ; clear screen
LCDOUT $FE,$87,"Hello,",$FE,$C8,"From DT!"

FOR LoopCount = 0 TO 65535
LCDOUT $FE,$80, IDEC LoopCount
LCDOUT $FE,$C0, IHEX4 LoopCount
NEXT LoopCount
GOTO Main

Pretty simple ey?

Just assign the Pins, Include the file, and away you go, using LCDOUT just like you always have.

Ok, so now for the other Simple part that can go tragically wrong if you're not careful.
Yes, ... that's right, ... I'm modifying the Library again. :eek:

Or, more accurately, ... "You" are modifying the Library.
And before "You" change anything, ...
"MAKE SURE" you have a backup of the file.
Don't blame me if it gets messed up and you don't have anything to restore it with.
And, I will apologize to MeLabs Support ahead of time for the extra support calls this will generate.
Back it up! and they won't have a problem.


In your PBP folder (the one with PBPW.EXE in it), open the Library file for the type PIC you are using.

For 16F's open PBPPIC14.lib with Notepad.
For 18F's open PBPPIC18.lib

Search for this string ";* LCDOUT ". That's "semicolon star space LCDOUT space".
You should see a section that looks like this ...
;************************************************* ***************
;* LCDOUT : Send char to LCD *
;* *
;* Input : W = char *
;* Output : None *
;* *
;* Notes : *
;************************************************* ***************

ifdef LCDOUTJ_USED
LIST
LCDOUTJ movf FSR, W ; Jumpman entry
NOLIST
LCDOUT_USED = 1
endif

ifdef LCDOUT_USED
; NEW Code goes here...
LIST
LCDOUT movwf R3 + 1 ; Save char
That one is from PBPPIC14.lib, for PBPPIC18.lib the only difference is it will show FSR0L, instead of FSR.

Insert this code into the spot marked ; NEW Code goes here...
It's very important that you get the EXACT line. Be careful ...
;************************************************* ***************
;* Added for HighJack *
;************************************************* ***************
HIGHJACK_USED = 1 ;*
LCDOUT_HIGHJACKED = 1 ;*
ifdef HJ_LCDOUT ;*
LIST ;*
LCDOUT ;*
L?GOTO HJ_LCDOUT ;*
NOLIST ;*
else ;*
;************************************************* ***************


Now, scroll down past the LCDOUT code, and you should see this ...
NOLIST
DUNN_USED = 1
PAUSEUS_USED = 1
endif
; Second piece of NEW Code goes here ...

;************************************************* ***************
;* LOOK2 : Get data from any register *
;* *
;* Input : R0 address / constant *
;* : W data type *
;* Output : R0 result *
;* *
;* Notes : *
;************************************************* ***************


Insert this code into the spot marked ; Second piece of NEW Code goes here ...

;************************************************* ***************
;* Modified for HighJack *
;************************************************* ***************
endif

If you got it right, you can now use your HD44780 LCD on any pins you wish.
If you got it wrong, restore the file you backed up (You did back it up, right?). Then try again. It work's. Really! Trust me!

GoodNote: This modification will NOT interfere with your normal PBP LCDOUT routines.
In order to invoke the Custom LCD port routines, the main file must have the statement ...

INCLUDE "LCD_AnyPin.pbp"
If that statement is NOT included in your program, the LCDOUT commands will work the same way they always have.

There are 2 files required to implement this approach ...

LCD_AnyPin.pbp
VirtualPort.bas -- (Included from the LCD_AnyPin.pbp file)

Both files are included in the Zip file below. Extract them to your PBP folder.

Acetronics2
- 1st November 2008, 15:39
MULTICALC


Hi, Bill

Here it is

Enjoy ...

Alain

Darrel Taylor
- 11th February 2009, 15:45
MIBAM (pronounced "My BAM")
Which stands for ... "Mirror Imaged Bit Angle Modulation"
An include module for PicBasic Pro.

http://www.pbpgroup.com/files/MIBAM/MIBAM.swf

After a year and a half of playing with this thing ... One statement from RadikalQ3 (http://www.picbasic.co.uk/forum/showpost.php?p=68968&postcount=4) made all my problems go away.
Thank you Radikal dude!

Also many thanks to BCD (http://www.picbasic.co.uk/forum/member.php?u=41) for beta testing the module.

I really liked the name "BAM-BAM", but MIBAM is probably a more descriptive acronym, so I've changed it. No matter what you call it ... I think you'll find that My "BAM" ... was the sound of hitting the nail on the head. :)

This module is a modification of the BAM (Bit Angle Modulation) idea presented by Artistic License.
For more information about BAM, it's blinking problem and how this program came to be, please see this thread ...
http://www.picbasic.co.uk/forum/showthread.php?t=7393

Click image for larger Interactive version.
http://www.picbasic.co.uk/forum/attachment.php?attachmentid=5376 (http://www.pbpgroup.com/files/MIBAM/MIBAM.swf)
Click image for larger Interactive version.

What can it do?

Well ... it can turn almost every pin on your PIC into an LED dimmer. (limitations apply)

First, let's take a look at the basic MIBAM setup,
For an RGB LED (3 outputs) it might look like this ....


;----[ MIBAM Setup ]--------------------------------------------------------
BAM_COUNT CON 3 ; How many BAM Pins are used?
INCLUDE "MIBAM.pbp" ; Mirror Image BAM module


RED VAR BYTE
GREEN VAR BYTE
BLUE VAR BYTE


ASM
BAM_LIST macro ; Define PIN's to use for BAM
BAM_PIN (PORTB,0, RED) ; and the associated Duty variables
BAM_PIN (PORTB,1, GREEN)
BAM_PIN (PORTB,2, BLUE)
endm
BAM_INIT BAM_LIST ; Initialize the Pins
ENDASM
;_________________________________________________ __________________________


At this point, each BAM_PIN has been automatically set to OUTPUT, and the PINs will idle LOW until the Dutycycle variables are changed.

The Dutycycle range is from 0-255, 0 = OFF, 255 = brightest.
To change the brightness of an LED simply set the Dutycycle variable to the desired level.
You don't need to call any subroutines.

Here's an example of just fading the RGB LED's up and down.


Speed CON 20 ; Smaller=Faster
Brightness CON 200 ; Max DutyCycle

Main:
FOR Red = 0 to Brightness -1 ; Ramp up 1 by 1
PAUSE Speed
NEXT RED
FOR GREEN = 0 to Brightness -1
PAUSE Speed
NEXT GREEN
FOR BLUE = 0 to Brightness -1
PAUSE Speed
NEXT BLUE


FOR Red = Brightness to 1 STEP -1 ; Ramp down 1 by 1
PAUSE Speed
NEXT RED
FOR GREEN = Brightness to 1 STEP -1
PAUSE Speed
NEXT GREEN
FOR BLUE = Brightness to 1 STEP -1
PAUSE Speed
NEXT BLUE
GOTO Main


FOR loops always leave the variable 1 count further than the loop specifies.
when using direct FOR loops, you must account for the difference.

The module will work on most 16F's, ALL 18F's and some 12F's
If you are using a 14-bit PIC. You'll need to add these variables to your program for the Interrupt Context.
For 18F's you don't need to add these save locations. And they may cause errors if you do.

;____[ For 12F/16F only - Interrupt Context save locations]_________________
wsave var byte $20 SYSTEM ' location for W if in bank0
;wsave var byte $70 SYSTEM ' Alternate save location for W
' if using $70, comment out wsave1-3
' --- IF any of these next three lines cause an error ?? -------------------
' Comment them out to fix the problem ----
' -- The chip being used determines which variables are needed -------------
wsave1 VAR BYTE $A0 SYSTEM ' location for W if in bank1
wsave2 VAR BYTE $120 SYSTEM ' location for W if in bank2
wsave3 VAR BYTE $1A0 SYSTEM ' location for W if in bank3
'---DO NOT change these-----------------------------------------------------
ssave VAR BYTE BANK0 SYSTEM ' location for STATUS register
psave VAR BYTE BANK0 SYSTEM ' location for PCLATH register

Limitations and Requirements

In order to use this module, you MUST be using MPASM for the assembler.
PBP's default PM.exe assembler will not work.
&nbsp;
This module takes over the Interrupts on the PIC because the timing of the waveforms must be exact.
With 16F's, You can NOT use any other interrupts, this includes ON INTERRUPT.
With 18F's, The module uses High Priority interrupts, and no other High Priority interrupts can be used.
Low priority Interrupts are available, but you still can NOT use ON INTERRUPT.
&nbsp;
The module uses Timer1, and it cannot be used for any other purposes.
Consequently, the PIC being used must have a Timer1.
&nbsp;
The number of LED's you can use is limited by the OSC frequency.
It's not that the module uses so much processor time that it needs more speed.
The limitation is the LSB (Least Significant Bit) of the DutyCycle, which is so short that it doesn't leave much time to do a whole lot of code.

@ 4Mhz, you can only run 4 LEDs MAX. This can be useful for RGB LED's on small chips.
@ 20Mhz, you can run 20 LEDs since there are more instructions available per period.
@ 48Mhz, you can run 48 LEDs, and anywhere in-between you can have the equivelant number of LEDs to match the OSC frequency.
If you attempt to use too many LEDs for a specific OSC frequency, the program will give a warning to indicate the results will be "Blinky".
&nbsp;
DO NOT overload your PIC.
A PIC can only source so much current. The specific amount is listed in the datasheet for the PIC you are using.
If you are driving a lot of LED's, you may need to buffer them with transistors or various other drive mechanisms.

Attached is the MIBAM.pbp module.
Download and unzip it to your PBP folder. (The one with PBPW.exe, usually C:\PBP)

Darrel Taylor
- 12th February 2009, 21:29
Option DEFINEs and Constants

BAM_COUNT CON xx
This constant must match the number of BAM_PINS being used.
If they do not match, an error will be displayed.
&nbsp;
DEFINE BAM_FREQ xxx
By default, the module determines what the maximum refresh rate is for any given setup, and uses that rate. Depending on the conditions, it may be 700hz or more.
If desired, you can set the frequency lower with this define.
&nbsp;
DEFINE BAM_INFO 1
When using this define, MIBAM will display some information about the Refresh Rate (Frequency), Minimum Period, and number of pins used.
&nbsp;
ScopeSync VAR PORTx.x
If this alias is used, MIBAM will output a sync signal on the specified pin for use with an oscilloscope.
This gives a nice stable view of the waveform.
The Pin is automatically set to output.


<hr>Error/Warning messages


Error: Symbol not previously defined (wsave)
When using a 12F or 16F, you need to add the wsave block shown above to your program.
This is not necessary for 18F's, so the vars have been omitted from the module.
&nbsp;
ERROR: Variable wsaveX position request beyond RAM_END xx
If the chip you are using doesn't have GP RAM in all 4 banks, then you have to comment out the wsave variables for any of the banks that don't have any. The ERROR message(s) tell you which ones need to be commented.
If the chip has ACCESS RAM at address $70, then it's best to use that location, instead of wsave1-3.
&nbsp;
Error: BAM_COUNT (x) is less than # of Pins used (x)
The BAM_COUNT constant MUST match the number of BAM_PINs being used.
Increase BAM_COUNT to fix the Error.
&nbsp;
Error: Duplicate label ("BAM_PIN" or redefining symbol that cannot be redefined)
The module requires case sensitivity in MPASM. But sensitivity has been turned off in MCS.
In MicroCode Sudio, View | Compile and Program Options | Compiler Tab ...
Check the "Case sensitive" box.
&nbsp;
WARNING: Too many BAM pins for xx Mhz - Results will be BLINKY!
The module can only run 1 LED per Mhz of the CPU's main Oscillator.
Reducing the number of LED's or increasing the OSC frequency should eliminate the warning.
&nbsp;
WARNING: BAM frequency (xxHz) is Less than Requested (xxHz)
The module determines what the maximum refresh rate is for any given setup.
If a BAM_FREQ has been defined that is higher than the maximum frequency, the module will warn you of the situation. This warning is not critical, and may still work in your application.
Commenting the DEFINE BAM_FREQ line will squelch the warning.
&nbsp;
MESSAGE: 'BAM_INFO' - MinPeriod= xx inst, Cycle= xxxx inst, Pins= xx, FREQ= xxx Hz
This is an informational message that will be shown if you have set DEFINE BAM_INFO 1 or get a "BAM frequency WARNING".

Darrel Taylor
- 15th February 2009, 17:02
Cylon Scanner

Here's another quick example that simulates a Cylon or Kitt car scanner.

It's running on a 16F887 with 8Mhz internal OSC. The PCB is the Microchip 44-pin Demo Board that comes with the PICkit2 Debug Express package.

It's not too bad with 8 LEDs, but 16 would be better. The sequence will automatically use however many LEDs you define.

By adjusting the constants, you can make it look like most of the different seasons of the shows. (Excluding the New "Knight Rider" 2009). 2009 can be done too, but it'll take a little modification.


http://youtu.be/ffLPT0hiThw

http://www.pbpgroup.com/files/MIBAM/Cylon.MOV

The main difference is in the way the Duytcycle variables are declared.
By grouping them in an Array, they can be used with FOR loops to control all the LEDs, instead of having to access each one individually like the RGB's.




;----[ MIBAM Setup ]--------------------------------------------------------
BAM_COUNT CON 8 ; How many BAM Pins are used?
INCLUDE &quot;MIBAM.pbp&quot; ; Mirror Image BAM module


BAM_DUTY VAR BYTE
LED1 [B]VAR BAM_DUTY[0] ; group them in an array for easy access
LED2 VAR BAM_DUTY[1] ; with FOR loops etc.
LED3 VAR BAM_DUTY[2]
LED4 VAR BAM_DUTY[3]
LED5 VAR BAM_DUTY[4]
LED6 VAR BAM_DUTY[5]
LED7 VAR BAM_DUTY[6]
LED8 VAR BAM_DUTY[7]


ASM
BAM_LIST macro ; Define PIN's to use for BAM
BAM_PIN (PORTD,0, LED1) ; and the associated Duty variables
BAM_PIN (PORTD,1, LED2)
BAM_PIN (PORTD,2, LED3)
BAM_PIN (PORTD,3, LED4)
BAM_PIN (PORTD,4, LED5)
BAM_PIN (PORTD,5, LED6)
BAM_PIN (PORTD,6, LED7)
BAM_PIN (PORTD,7, LED8)
endm
BAM_INIT BAM_LIST ; Initialize the Pins
ENDASM


Then with all the dutycycles in the array, you can do something like this.





Speed CON 6 ; Smaller=Faster
TracerSpeed CON 15 ; Smaller=Faster Left/Right
Brightness CON 200 ; Tracers DutyCycle
DrainSpeed CON 30 ; Smaller=Shorter Trail


Idx VAR BYTE
LoopCount VAR BYTE
NextLED VAR BYTE
TraceDIR VAR BIT


TraceDIR = 0
LoopCount = 0
NextLED = 0

Main:
if LoopCount = TracerSpeed then ; __[ Cylon/Kitt Scanner ]__
LoopCount = 0
BAM_DUTY(NextLED)=Brightness
if TraceDIR then ; if scanning left
NextLED = NextLED - 1
if NextLED = 0 then TraceDIR = 0
else ; else scanning right
NextLED = NextLED + 1
if NextLED = BAM_COUNT-1 then TraceDIR = 1
endif
endif

FOR Idx = 0 to BAM_COUNT - 1 ; Drain all dutycycles
IF BAM_DUTY(Idx) > 0 then
BAM_DUTY(Idx)=BAM_DUTY(Idx)*DrainSpeed/(DrainSpeed+1)
ENDIF
NEXT Idx
pause Speed
LoopCount = LoopCount + 1
GOTO Main

Attached is the full code and HEX file for the 887 on the Demo Board.

Darrel Taylor
- 2nd May 2009, 08:43
ALLDIGITAL.pbp

If you want to use all the pins on your PIC as general Input/Output, you must first enable the DIGITAL inputs that are multiplexed with the ADC and Comparator pins.

MICROCHIP in their infinite(simal) wisdom has DISABLED the DIGITAL inputs on Power-Up. Leaving everyone to figure out which of the 10 different ways they need to use to turn them on for the chip they're programming at any given time. :(
Sometimes it's ADCON1 and CMCON, other times it's ANSEL and CMCON0, and still others it might take ANSELA ANSELB ANSELC and ANSELD.

This file is an attempt to rectify that situation.
I've tested it on all the common chips we use with PBP, and it workes extremely well.
<hr>

Simply INCLUDE the file, and all PINs will have any DIGITAL inputs enabled. Whether it's from the A/D converter or the Comparator(s).
A single line will remove that big thorn from your ...


INCLUDE "ALLDIGITAL.pbp"

If you are using MPASM for the assembler, add the following line to your program and the registers that need to be set for the CPU you are compiling for will be shown in the "Results" window of MCS.
DEFINE SHOWDIGITAL 1

For example, with a 16F877A it would show ...
... MESSAGE:(ADCON1 = 7)
... MESSAGE:(CMCON = 7)
At that point, you can just add those lines to your program and delete the INCLUDE line.
If it shows a 0x7F type number, change it to $7F.

Or for better compatibility, you can leave the INCLUDE in your program, and it will work with whatever chip you are compiling for.

Here's a simple example for blinking an LED on PORTA.0, without worrying about the analog registers.
INCLUDE "ALLDIGITAL.pbp"

Main:
TOGGLE PORTA.0
PAUSE 500
GOTO Main<hr>
Current Version = 1.4 (7/19/2010)
Version History:<table border=1 cellspacing=1 cellpadding=3><tr><td>Version</td><td>Reason</td><td align=center>Credit</td></tr><tr><td align=center>1.0</td><td>Initial release</td><td align=center>Darrel Taylor</td></tr><tr><td align=center>1.1</td><td>Added Shared address SFR support for 18F87J50 family</td><td align=center>mister_e/scalerobotics</td></tr><tr><td align=center>1.2</td><td>Removed MPASM specific opcode (variable), for PM.exe</td><td align=center>Tobias</td></tr><tr><td align=center>1.3</td><td>Added ANSELA,B,D and E for the 16F72x series</td><td align=center>Darrel Taylor</td></tr><tr><td align=center>1.4</td><td align=center>Added ANSEL0 and ANSEL1 for the 18F4431 series</td><td align=center>Darrel Taylor</td></tr><tr><td align=center>1.5</td><td align=center>unknown</td><td align=center>This could be you!</td></tr></table>
The attached .zip has only one file, ALLDIGITAL.pbp extract it to your PBP folder (the one with PBPW.exe).
<br>

Darrel Taylor
- 5th November 2009, 05:29
USBDemo was a good starting point for me, Thanks Steve.
But there are several problems that don't coincide with what you want.

1) When you disconnect the cable, it will still try to send data, causing the PIC to enter a Locked Loop, waiting to send to an inactive bus.

2) You really have no indication that anything was received.
If there's no incoming data, it just goes ahead and sets the dutycycles again, using the old data left over in the buffer.

3) There's no indication of when it's connected, when something was received or when it's ok to send.

4) With the 1mS servicing from Timer0, it's a bit sluggish when enumerating, overall data rates suffer and it uses TMR0 when it doesn't need to.

5) EasyHID no longer works with 2.60, so it's difficult to make changes to the descriptors.

6) I don't use Visual Basic, so I can't update the PC program.
My main language is Delphi, and I stopped using mchid.dll a long time ago.

I would have worked with Steve to build a better demo, but alas, he's not here.
<hr>
I'm thinking it's time to unveil DT_HID.
It's the PIC side of USB, made ... yes, I'll say it ... EASY!

The PC side is still up to you, but it even works with Steve's original VB prog, so that, or any other VB/Delphi program from EasyHID can be used as a "template".

I'm not even going to tell you how it works. :eek:
I defy you to not understand what it does.
Up until you ask a question.

Warning, the example is setup for 13K50/14K50.
Comment the configs, and uncomment the other configs (if needed).
Change ANSELs to ADCON1 (if needed).

Also note: This is for PBP 2.60 only.
BasicUSB.pbp is the test program.

Don't shoot me, I can't even play a piano ...

Darrel Taylor
- 5th November 2009, 18:26
Apparently, I missed the CONFIG2L.
I always miss that one, weird ...

__CONFIG _CONFIG2L, _PWRT_ON_2L & _BOR_OFF_2L & _VREGEN_ON_2L

And try the HIDmonitor program from the .zip

When I said it works with Steve's original program, well it will, but it's not set up to send/receive the same analog values and switches/LED's. With HIDmonitor you should see when it connects and what data it's sending.

hth,

Darrel Taylor
- 10th November 2009, 09:21
OK, this program should work with Steve's original USBDemo GUI.

18F2550/4550, 8Mhz, DT_INTS-18, DT_HID260.

Cheers,

Darrel Taylor
- 12th September 2010, 22:33
Nothing wrong there.

There are two different actions that can change the way INT_ENABLE works with version 1.10.

DEFINE INT_ENABLECLEARFIRST 1 ; (default)
With the above define, which is also the default, whenever you INT_ENABLE, the flag is automatically cleared before the interrupt is enabled.

DEFINE INT_ENABLECLEARFIRST 0
Whith this define, the flag is NOT cleared.
This can dramatically change the results and cause immediate interrupts if the flag is already set.

If INT_ENABLECLEARFIRST is 0, then INT_ENABLE takes one instruction cycle.
If INT_ENABLECLEARFIRST is 1, then INT_ENABLE takes two instruction cycles.

INT_DISABLE always takes one instruction.

Demon
- 27th April 2011, 04:11
MULTICALC


I had to download & install Microsoft ActiveX control Pad to get LCD tool working.

I had to download & register MSSTDFMT.DLL to get Timer tool working.

All tools worked after that.

Nice utility, I had the old SPBRG version.

Demon
- 18th March 2012, 15:04
MULTICALC


If you get this in Win 7 64bit:

ActiveX Control Pad Setup:
the app was unable to start correctly (0xc0000142)

Run in XP compatibility mode.



To register MSSTDFMT.DLL in Win 7 64bit:

- download the file from microsoft.
- copy to C:\Windows\SysWOW64 folder
- RUN REGSVR32 C:\Windows\SysWOW64\MSSTDFMT.DLL

Robert

Darrel Taylor
- 25th October 2012, 20:15
It keeps running in the background.
The interrupts will not wait for PBP statements to finish.

Ok fine, ... for many years I've resisted making a count down elapsed timer for humanitarian reasons.
But if you guys are going to do it anyhow, I might as well make a new version of the Elapsed Timer.
I can only hope that if somebody uses it for nefarious purposes, they end up blowing themselves up.

Here's the test circuit.

http://support.melabs.com/DT/Elapsed_DN.gif

Here's the test program ...
' Define LCD connections
DEFINE LCD_DREG PORTC ' Set LCD Data port
DEFINE LCD_DBIT 4 ' Set starting Data bit (0 or 4) if 4-bit bus
DEFINE LCD_RSREG PORTC ' Set LCD Register Select port
DEFINE LCD_RSBIT 2 ' Set LCD Register Select bit
DEFINE LCD_EREG PORTC ' Set LCD Enable port
DEFINE LCD_EBIT 3 ' Set LCD Enable bit
DEFINE LCD_BITS 4 ' Set LCD bus size (4 or 8 bits)
DEFINE LCD_LINES 2 ' Set number of lines on LCD
DEFINE LCD_COMMANDUS 2000 'Command delay time in us
DEFINE LCD_DATAUS 50 'Data delay time in us

DEFINE OSC 4

INCLUDE "Elapsed_DN.bas" ; Elapsed Timer Routines

ZERO_LED VAR PORTB.3

ANSEL = 0 ' All Digital
ANSELH = 0
LOW ZERO_LED ' start with LED OFF
OPTION_REG.7 = 0 ' enable PORTB pull-ups
PAUSE 250
LCDOUT $FE,1 ' Initialize LCD
PAUSE 250

Days = 1 ' set initial time
Hours = 1
Minutes = 3
Seconds = 10

GOSUB StartTimer ' Start the Elapsed Timer

Main:
CountDown = !PORTB.0
IF SecondsChanged = 1 THEN
SecondsChanged = 0
LCDOUT $FE,2, DEC Days,"d-",DEC2 Hours,":",DEC2 Minutes,":",DEC2 Seconds
ENDIF
IF ZERO_LED != ZERO THEN ZERO_LED = ZERO
GOTO Main

If the button on PORTB.0 is pressed it counts down.
If it is not pressed, it counts up.
The LED comes on when it reaches 0.

If you are using the countdown for a movie set, it has to stop at 1 second. :)
Put this in the main loop.
IF (CountDown=1) AND (Days=0) AND (Hours=0) AND (Minutes=0) and (Seconds=1) _
THEN GOSUB StopTimer


You'll need the ASM_INTS include from the original Elapsed Demo.

Demon
- 23rd December 2014, 15:58
NOTE: Posts will be copied into this thread, so some will appear ABOVE this post. That is normal, they are dated sooner.


After busting my nose for 3 days against Elapsed Timer at 64MHz on a 18F44K22 and finding out today Darrel released a K22 version, I thought it was high time to centralize all these modules along with corresponding information.

This thread is not limitted to DT's works, it's also there for Mr E's Multicalc and any other utility that we may be losing over time. Once accumulated, I'll post them up in a sticky in the PBP Extension/Add-On subforum.

If you see a utility that is not mentionned in this thread, please post a link to that utility. I will copy Darrel's entire post in this thread.

Robert

Demon
- 23rd December 2014, 18:53
Since Darrel's site is down and the archives might have older versions, this is what I have so far.

7558
v1.1 Aug 13, 2010 DT_INTS-14.bas
v3.4 Aug 13, 2010 ReEnterPBP.bas

7559
v3.3 Mar 24, 2008 DT_INTS-18.bas
v1.4 Mar 24, 2008 ReEnterPBP-18.bas
v1.4 Mar 24, 2008 ReEnterPBP-18LP.bas

7560
v1.0 Jul 11, 2006 Elapsed_INT-18.bas

7561
v1.3.1 2006 PicMultiCalc.exe

7567
v1.4 Jul 19, 2010 ALLDIGITAL.pbp

7568
v2 V2SPBRGCalc.exe

7569
v2 Jan 20,2009 DT_CodeSize.pbp

7570
v1 May 23,2009 DT_Analog.pbp

7595
v1.1 May 5, 2007 HPWM10.pbp

7596
v1 SPWM_INT.bas


Reached limit of 10 attachments per post.
List continued here: http://www.picbasic.co.uk/forum/showthread.php?t=19638&p=130315#post130315


If you have newer versions, please post them.


Archives:
http://web.archive.org/web/20120617215701/http://darreltaylor.com/DT_INTS-18/home.html

Robert

pedja089
- 23rd December 2014, 19:11
Great idea!
Just found this on my PC:
7564
7565
7566

Demon
- 23rd December 2014, 19:32
Thanks Pedja,

I didn't have DT CodeSize and DT Analog Oversampling, added them to my list.

Robert

longpole001
- 23rd December 2014, 20:05
didnt he do a software PWM code as well ???

Demon
- 23rd December 2014, 20:16
Yup, like I said in chatbox, I'm looking for DT_SPWM and DT_Elapsed_K22.

Robert

longpole001
- 23rd December 2014, 20:24
there is no elapsed k22 version just the int-18_k22 processor support , see other post in your elapsed thread

pedja089
- 23rd December 2014, 23:12
Here is my version of Darrels 10bit HPWM_L. Original version works with PBPW. There is comments in code, what is changed. Later Darrel publise his version on me labs forum.
Example:


include "HPWM_L.pbp"
DutyCycle1 VAR WORD
DutyCycle2 VAR WORD
Frequency VAR WORD
@ HPWM10 1, _DutyCycle1, _Frequency
@ HPWM10 1, _DutyCycle2, _Frequency
Frequency must be same for all channels.
7587
EDIT:
Here is archive with original code and example:7588
I can't find S_PWM :(

Demon
- 24th December 2014, 01:41
7600
v1 Dec 30,2006 USBDemo.pbp (PBP & VB)

7599
v1 May 8, 2007 USBDemo_2455.pbp (PBP)

7598
v1 May 8, 2007 USBDemo_2550.pbp (PBP)

7597

7593
v2.0 Jul 23,2009 DT_HID260.pbp (PBP & VB)

7594
v2.1.1.29 2007 HIDmonitor.exe (PBP)

Robert

Ioannis
- 24th December 2014, 08:03
Great work Robert! Many thanks.

Ioannis

pedja089
- 24th December 2014, 12:57
SPWM_INT with example:
7592

Demon
- 24th December 2014, 15:11
Great, got Mister E's 2 USB routines, just have to put comments in those and Darrel's.

Then fix up the interrupt for K22 series and that'll be most of it.

Robert


Edit: still need LCD ANYPIN though.

Demon
- 24th December 2014, 17:51
Temporary post, just storing attachments lifted from old computer.
(Attachments get deleted after a while if they are not linked to a post.)

7612
7609
7613
7611
7614
7610

Will sort through these later. I'm just lifting everything and anything I can find on my PCs.

Robert

pedja089
- 2nd January 2015, 10:57
Here is Run-Time Config :
Original thread:
http://www.picbasic.co.uk/forum/showthread.php?t=4093


How many times have you been told that CONFIG settings can only be changed by an ICSP programmer while downloading the program's code? And how many times did you believe them? Well, for me, it was every time, until I ran across a BIT that I didn't recognize in the datasheets.

CFGS: Flash Program/Data EEPROM or Configuration Select bit
1 = Access Configuration registers
0 = Access Flash program or data EEPROM memory

Once I saw that, I knew it could be done, it was just a matter of figuring out how. The datasheet was really vague, and it simply said that it was similar to writing to Flash Memory. After a little trial and error, I found that it really is just that easy. So maybe, you want to add a routine to verify that the chip has been programmed with the proper config settings for the program. Or maybe you need to change the settings according to the users input from a menu. Now you can.

This option is available on every 18F that I've looked at so far, so that means it's been around for years. And, no, it's not available on any 16F's that I've seen.<HR>
This program presents the following macros:
@ ReadConfig?CB _CONFIG3H, tempbyte
Read the contents of a CONFIG register and place the results in a PBP byte variable. The constant for the CONFIG location can be either, one of the pre-defined names from the MPASM .inc file such as _CONFIG1H or _CONFIG3H, or the address of the location like 300001h
@ ReadConfig?BB AddrByte, tempbyte
Read the contents of a CONFIG register using a byte offset from the start of the CONFIG address space. For instance, to read register 300001h, the AddrByte variable will have the value 1. The result will be placed in a PBP byte variable.
@ WriteConfig?CB _CONFIG1L, tempbyte
Write a byte to the CONFIG register designated by a constant
@ WriteConfig?BB AddrByte, tempbyte
Write a byte to the CONFIG register using an offset to the CONFIG adress space
@ WriteConfig?CC _CONFIG5L, 0Fh
Write a byte sized constant to the CONFIG register designated by a constant
Obviously there are some issues to think about before using these macro's. Such as, an oscillator must be running to be able to execute code. So trying to set the oscillator config at run-time will only work if you start off with a configuration that allows a system clock. Other changes in mid stream might put the CCP output on a pin that has a low impeadance signal on the input, causing damage. It's up to you to make sure these things don't happen. Which I guess is no different than if you're using ICSP.

http://www.darreltaylor.com/RTconfig/RTconfig.inc.txt
http://www.darreltaylor.com/RTconfig/TestConfig.pbp.txt
New Files:7627

Kmt
- 29th January 2015, 20:09
ALLDIGITAL version 1.5

7692

Kent

Archangel
- 30th January 2015, 06:21
DT_Analog
From Darrel's website . . . all his words, not mine.

You've probably noticed that when using the Analog to Digital converter, the numbers are NEVER stable. At best, the result will always be bouncing back and forth between two numbers.

While it's extremely annoying, there is a reason for it, and the number of times it bounces between those two numbers is actually indicating the values of more bits of resolution that are not included in the original 10-bit result.
This effect can be exploited to increase the effective number of bits in the result.

By taking a number of consecutive samples and averaging the results with a lower divisor, you can get up to 16-bit accuracy from that poor little 10-bit converter.

An explanation of the Oversampling technique can be found on Wikipedia.
http://en.wikipedia.org/wiki/Oversampling



A/D Bits
Samples Required
MAX result
Conv. Time (1)




10
1
1023
24.2us



11
4
2046
96.8us



12
16
4092
387us



13
64
8184
1.54ms


14
256
16368
6.2ms


15
1024
32736
24.7ms


16
4096
65472
99.1ms




(1) Conversion Time based on 5 us acquisition with 1.6 us Tad



Samples required:
For each additional bit of resolution, the number of samples required is multiplied times 4 (22(n-10)). The samples are accumulated in a 32-bit variable, then divided by a number that is doubled for each additional bit (2(n-10)). [This is all handled by the module.]

Maximum results:
Since the highest value provided by the converter is 1023, it can't bounce between 1023-1024.
This limits the maximum values to slightly lower than expected, which is (1023 << (bits-10))
For 16-bits, the maximum is (1023 << 6) or 65472. This value is returned in the ADmax variable after the conversion for easy voltage calculations.

Practicality:
Taking 1/10th of a second to convert a 16-bit value seems like a colossal waste of time. But it's nice to know you can do it if you really need to.

To me, the real winner is 12-bit, at under 400us conversion time, with a 4 fold increase in resolution, on almost any PIC, ... I doubt I'll be using 10-bit much anymore. But even 14-bit's not too bad @6ms, although the extra time for 14-bit probably isn't worth it for most analog projects.

Conversion time:
The time it takes to complete a conversion depends on a couple of factors.


1. The Acquisition time specified in the DEFINE ADC_SAMPLEUS statement. If there is no DEFINE, PBP will default to 50us, which is for the absolute worst case scenario with high impedance. It's very likely that you will be able to use a much smaller value. With an impedance of 1K or less, you can usually get away with 3-5us. Also, the minimum ADC_SAMPLEUS is limited to the minimum PAUSEUS delay, which at 4Mhz OSC is 24us, @20Mhz it's 3us. Use as low a value as you can possibly get away with because this time happens for every sample. With 256 or more samples being taken, it adds up pretty quick.
2. The ADC clock source should be set as close as possible to 1.6us Tad. And it takes 12 Tad to complete a 10-bit conversion. This one's hard to explain, so I'll just list the recommended values. Use the highlighted values in your DEFINE ADC_CLOCK statement, based on your oscillator frequency.



OSC
DEFINE ADC_CLOCK
Clk source
Tad(us)
12 Tad(us)





4
1
Fosc/8
2
24



8
5
Fosc/16
2
24



10
5
Fosc/16
1.6
19.2



12
2
Fosc/32
2.6
31.2


16
2
Fosc/32
2
24


20
2
Fosc/32
1.6
19.2



24
6
Fosc/64
2.6
31.2



32
6
Fosc/64
2
24



40
6
Fosc/64
1.6
19..2



48
3
FRC
4
48us






Noise in the system:
As previously mentioned, it's the number of times the value bounces back and forth between two numbers that allows it to gain more bits of resolution.
If (due to poor design) your A/D values are swinging wildly even at normal 10-bit, this system will also help calm them down (some) since it will find an average of the samples taken. Usually it's the mid-point of those swings that you want to find anyway. Naturally, you should minimize ALL noise as much as possible to begin with.

Using the Module:
You must first configure your PIC to have the desired Analog inputs and use the correct Oscillator source. This module will not do it for you.
You must also set the ADC DEFINE's for the fastest available 10-bit results, depending on your oscillator frequency.
Then INCLUDE the file somewhere near the top of your program.

Set the ADchan variable to the AN channel you wish to read. (ADchan = 1)
Set the ADbits variable to the desired resolution. (ADbits = 12)
Then GOSUB GetADC.

The resulting value will be returned in the ADvalue word sized variable.
And the maximum A/D value for the selected resolution is returned in the ADmax variable.




'http://www.darreltaylor.com/DT_Analog/
'************************************************* ***************
'* Name : DT_Analog.pbp *
'* Author : Darrel Taylor *
'* Notice : Copyright (c) 2009 *
'* Date : 5/23/2009 *
'* Version : 1.0 *
'* Notes : Up to 16 bit A/D with a 10-bit A/D converter *
'* : http://en.wikipedia.org/wiki/Oversampling *
'************************************************* ***************
GOTO OverDTAnalog

ADchan VAR BYTE ; global - A/D channel to use
ADbits VAR BYTE ; global - # of bits in result
ADvalue VAR WORD ; global - the final A/D value
ADmax VAR WORD ; global - Max A/D value at this resolution
;--------------------
DTadCount VAR WORD ; local - sample count
DTadDivisor VAR WORD ; local - averaging divisor
DTadShiftR VAR BYTE ; local - bits to shift for UnderSampling
DTadAccum VAR WORD[2] ; local - 32-bit sample accumulator

;---------------------------------------------------------------------------
GetADC:
IF (ADbits >= 10) THEN
DTadShiftR = 0 ; 10 11 12 13 14 15 16
LOOKUP2 ADbits-10,[ 1, 4,16,64,256,1024,4096],DTadCount
LOOKUP ADbits-10,[ 1, 2, 4, 8, 16, 32, 64],DTadDivisor
ELSE
DTadCount = 1
DTadDivisor = 1
DTadShiftR = 10 - ADbits
ENDIF
LOOKUP2 ADbits,[0,1,3,7,15,31,63,127,255,511,1023, _
2046,4092,8184,16368,32736,65472],ADmax

DTadAccum = 0 : DTadAccum[1] = 0 ; clear the accumulator
DTadLoop:
ADCIN ADchan, ADvalue ; get 10-bit sample
DTadAccum = DTadAccum + ADvalue ; add it to the accumulator
IF DTadAccum < ADvalue THEN ; if low word overflowed
DTadAccum[1] = DTadAccum[1] + 1 ; increment the high word
ENDIF
DTadCount = DTadCount - 1 ; done with this sample
IF DTadCount > 0 THEN DTadLoop ; loop if not done with ALL samples

R2 = DTadAccum ; put 32-bit accumulated value in PBP
R0 = DTadAccum[1] ; registers, prepare for DIV32
ADvalue = DIV32 DTadDivisor ; get the average value
ADvalue = ADvalue >> DTadShiftR ; Shift right if < 10-bit
RETURN
OverDTAnalog:



************************************************** ***************************
************************************************** ***************************


Here's a simple example that displays 12-bit A/D values on an LCD.
Of course, by changing one number it will display 16-bit values too.

Download 12-bit example Download example code.
(Save it to a new folder. Not the PBP folder)
View 12-bit DEMO in browser View


;--- Set your __configs here as needed ---
DEFINE OSC 20
INCLUDE "DT_Analog.pbp" ; DT's 16-bit Analog Module

DEFINE ADC_BITS 10 ; Set-up ADC for fast 10-bit results
DEFINE ADC_CLOCK 2
DEFINE ADC_SAMPLEUS 5

;----[Change these to match your hardware]----------------------------------
DEFINE LCD_DREG PORTB ; LCD Data Port
DEFINE LCD_DBIT 0 ; Starting Data Bit
DEFINE LCD_RSREG PORTB ; Register Select Port
DEFINE LCD_RSBIT 4 ; Register Select Bit
DEFINE LCD_EREG PORTB ; Enable Port
DEFINE LCD_EBIT 5 ; Enable Bit
DEFINE LCD_BITS 4 ; Data Bus Size
DEFINE LCD_LINES 2 ; Number of Lines on LCD
DEFINE LCD_COMMANDUS 2000 ; Command Delay time in uS
DEFINE LCD_DATAUS 50 ; Data Delay time in uS

ADCON1 = %10001101 ; right justify, AN0 & AN1 analog
PAUSE 250 : LCDOUT $FE,1 ; Initialize LCD
PAUSE 100 : LCDOUT $FE,1 ; not all LCDs need both lines

ADbits = 12 ; set to 12-bit resolution
;---------------------------------------------------------------------------
Main:
FOR ADchan = 0 to 1 ; Do both AN0 and AN1
GOSUB GetADC ; Get A/D value
IF ADchan = 0 THEN
LCDOUT $FE, $80 ; LCD line 1
ELSE
LCDOUT $FE, $C0 ; LCD line 2
ENDIF
LCDOUT "CH-",DEC1 ADchan," = ",DEC ADvalue," "
NEXT ADchan
GOTO Main:



************************************************** ********************************
************************************************** ********************************


Here's another example that shows all the resolutions from 1-16 bit from a single A/D channel via the USART with HyperTerminal or other ANSI terminal program.


Download ALL-bit example Download example code.
(Save it to a new folder. Not the PBP folder)
View ALL-bit DEMO in browser View

;--- Set your __configs here as needed ---
DEFINE OSC 20
INCLUDE "DT_Analog.pbp" ; DT's 16-bit Analog Module

DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 2
DEFINE ADC_SAMPLEUS 5

DEFINE HSER_SPBRG 10 ; 115200 @ 20 Mhz
DEFINE HSER_RCSTA 90h ; Hser receive status init
DEFINE HSER_TXSTA 24h ; Hser transmit status init
DEFINE HSER_CLROERR 1 ; Hser clear overflow automatically

Volts VAR WORD ; Volts calculated from the A/D reading

ADCON1 = %10001101 ; right justify, AN0 & AN1 analog
HSEROUT [27,"[2J"] ; Clear screen
;---------------------------------------------------------------------------
Main:
HSEROUT [27,"[H"] ; home cursor
HSEROUT [27,"[34m",27,"[1m"] ; bold blue text
HSEROUT ["ADbits DEC HEX BIN16 ADmax Volts"]
HSEROUT [27,"[37m",13,10] ; black text

ADchan = 1 ; Select channel AN1
FOR ADbits = 1 to 16 ; cycle thru all bit resolutions
GOSUB GetADC ; get the A/D value
GOSUB ShowAD ; show the A/D results
NEXT ADbits ; do next resolution
GOTO Main

;---------------------------------------------------------------------------
ShowAD:
IF ADbits < 10 THEN HSEROUT [" "]
HSEROUT [DEC ADbits,"-bit = ",DEC ADvalue," "]
HSEROUT [27,"[",DEC ADbits+1,";16H",HEX4 ADvalue," ",BIN16 ADvalue, _
" ",DEC ADmax]
IF ADbits < 16 THEN ; calculate the Voltage with 4 decimals
Volts = 50000 * ADvalue
Volts = DIV32 ADmax
ELSE ; with 16-bit, ADmax is too big for DIV32
ADmax = ADmax >> 1 ; cut it in half
Volts = 25000 * ADvalue ; and scale the multiplier accordingly
Volts = DIV32 ADmax ; PBPL & Longs, doesn't have that problem
ENDIF
HSEROUT [27,"[",DEC ADbits+1,";49H", _
DEC Volts/10000,".",DEC4 Volts//10000 ,13,10]
RETURN



This is a screen shot of the ALLBitDEMO in action.


And before you ask Charles ...
This will not work (as is) on a PIC with a 12-bit A/D converter.

************************************************** ********************
************************************************** ********************


'http://www.darreltaylor.com/DT_Analog/
'************************************************* ***************
'* Name : AllBitDEMO.pbp *
'* Author : Darrel Taylor *
'* Notice : Copyright (c) 2009 *
'* Date : 5/24/2009 *
'* Version : 1.0 *
'* Notes : Example program for DT_Analog.pbp *
'* Displays all possible A/D resolutions for a single *
'* channel using the USART and HyperTerminal or other *
'* ANSI terminal program *
'************************************************* ***************
;--- Set your __configs here as needed ---
DEFINE OSC 20
INCLUDE "DT_Analog.pbp" ; DT's 16-bit Analog Module

DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 2
DEFINE ADC_SAMPLEUS 5

DEFINE HSER_SPBRG 10 ; 115200 @ 20 Mhz
DEFINE HSER_RCSTA 90h ; Hser receive status init
DEFINE HSER_TXSTA 24h ; Hser transmit status init
DEFINE HSER_CLROERR 1 ; Hser clear overflow automatically

Volts VAR WORD ; Volts calculated from the A/D reading

ADCON1 = %10001101 ; right justify, AN0 & AN1 analog
HSEROUT [27,"[2J"] ; Clear screen
;---------------------------------------------------------------------------
Main:
HSEROUT [27,"[H"] ; home cursor
HSEROUT [27,"[34m",27,"[1m"] ; bold blue text
HSEROUT ["ADbits DEC HEX BIN16 ADmax Volts"]
HSEROUT [27,"[37m",13,10] ; black text

ADchan = 1 ; Select channel AN1
FOR ADbits = 1 to 16 ; cycle thru all bit resolutions
GOSUB GetADC ; get the A/D value
GOSUB ShowAD ; show the A/D results
NEXT ADbits ; do next resolution
GOTO Main

;---------------------------------------------------------------------------
ShowAD:
IF ADbits < 10 THEN HSEROUT [" "]
HSEROUT [DEC ADbits,"-bit = ",DEC ADvalue," "]
HSEROUT [27,"[",DEC ADbits+1,";16H",HEX4 ADvalue," ",BIN16 ADvalue, _
" ",DEC ADmax]
IF ADbits < 16 THEN ; calculate the Voltage with 4 decimals
Volts = 50000 * ADvalue
Volts = DIV32 ADmax
ELSE ; with 16-bit, ADmax is too big for DIV32
ADmax = ADmax >> 1 ; cut it in half
Volts = 25000 * ADvalue ; and scale the multiplier accordingly
Volts = DIV32 ADmax ; PBPL & Longs, doesn't have that problem
ENDIF
HSEROUT [27,"[",DEC ADbits+1,";49H", _
DEC Volts/10000,".",DEC4 Volts//10000 ,13,10]
RETURN

mark_s
- 30th January 2015, 21:08
Here is another one of DT's gems "MBAM". Maybe one of the moderators could move it here?

http://www.picbasic.co.uk/forum/showthread.php?t=10564


Edit: Thank you, done!

Acetronics2
- 1st April 2015, 18:12
another one : The custom character generator ...7755

.zip file to be extracted to the folder you want

Alain

richard
- 2nd March 2016, 12:40
this is worth a mention . a mplax compatible version of dt_ints-18 (ver 3.4)

http://support.melabs.com/threads/110-MPLABX-DT_INTS-18.bas-error?highlight=mplabx

mark_s
- 13th August 2016, 19:52
Searching for Read/Write examples I found this thread by DT. Which has examples using macros for reading and writing to eeprom

http://www.picbasic.co.uk/forum/showthread.php?t=2444&highlight=write+eeprom

mark_s
- 13th August 2016, 21:00
After reading the complete thread. DT states in one of the last post, that most of the benifits are now incorporated
in PBP3. So this thread is only useful for older versions of pbp or those studying macros. He was a very generous
person.

lester
- 10th March 2018, 08:58
UPDATE

A new repository has been created, to make finding and using the information imparted by the late Darrel Taylor.

---> See Here (http://dt.picbasic.co.uk/) <---

Ioannis
- 10th March 2018, 11:12
Maybe this can show also as a link on forums main page?

Ioannis

lester
- 11th March 2018, 07:10
Default Re: Temporary central repository of Darrel Taylor's works (including Mr E's Multicalc

Maybe this can show also as a link on forums main page?

At the top of the main forum page there is a menu, on that menu there is an entry "interrupts" which takes you to dt.picbasic.co.uk

Demon
- 14th February 2021, 20:58
Wow, we've come a long way from this "temporary" thread.

The new site looks great! Thanks to everyone that contributed, and to Lester for getting it done.

Cheers! Darrel would be proud.