Please login or register.

Login with username, password and session length

Author Topic: XTBM Pro  (Read 24528 times)

JeffVolp

  • Moderator
  • Hero Member
  • *
  • Helpful Post Rating: 122
  • Posts: 2299
    • XTB Home Page
XTBM Pro
« on: May 29, 2011, 01:08:01 AM »

I'm starting work on the XTBM Pro code, and am looking for some feedback.

The PIC has an additional 128 bytes of RAM for the logging file, so the amount of data that can be stored is limited.  The following data will be logged:

Logging history index (1 to N)
Elapsed time from present in seconds (1 hour max)
Decoded command or type of error
X10 voltage (10mV - 10V)
Frequency (105 - 135KHz)

The elapsed time will be relative to when the logging mode is entered so the numbers don't keep changing.  Storing this much data limits the logging history to probably 32 commands.  That doesn't sound like much, but it will take a fair number of button presses to scroll through.  Leaving off the elapsed time could expand the history to 40 commands.

Suggestions?

Jeff
Logged
X-10 automation since the BSR days

JeffVolp

  • Moderator
  • Hero Member
  • *
  • Helpful Post Rating: 122
  • Posts: 2299
    • XTB Home Page
Re: XTBM Pro
« Reply #1 on: August 26, 2011, 10:48:13 AM »


Bankswitchitis!

Yes, I'm working on the XTBM Pro code.  My working registers have overflowed the PIC page 0 RAM, so I'm now dealing with having to switch back and forth between memory banks just to access workspace RAM.

This is the major difference between the “consumer” PICs and the Motorola/Freescale microcontrollers I used for most of my career.  Those devices have a flat memory map, with the entire ROM, RAM, and I/O in the same address space.  The PIC segmented memory is a major pain to deal with.  The PICs also force us back into the BASIC era, with GOTO instructions all over the place.  It works, but the convoluted assembly code is ugly.

Anyway, I'm plugging along with this.

Jeff
Logged
X-10 automation since the BSR days

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13295
Re: XTBM Pro
« Reply #2 on: August 26, 2011, 11:20:30 AM »

Thanks for the progress report.
Logged

Alan V

  • Hero Member
  • *****
  • Helpful Post Rating: 8
  • Posts: 171
Re: XTBM Pro
« Reply #3 on: August 26, 2011, 12:05:40 PM »

Jeff, which PIC are you using?
Logged

JeffVolp

  • Moderator
  • Hero Member
  • *
  • Helpful Post Rating: 122
  • Posts: 2299
    • XTB Home Page
Re: XTBM Pro
« Reply #4 on: August 26, 2011, 01:19:53 PM »

Jeff, which PIC are you using?

I had been targeting the 16F1824, but the 1825 is now available.  That removes the memory limitation discussed at the beginning of this thread, so the log buffer will be 100 samples long.

The 16F1823 is used in the XTB-232.

My favorite microcontroller is the Motorola/Freescale MC16HC908SR12 that I used a decade ago.

(corrected a typo in the Motorola part number)

Jeff
« Last Edit: August 26, 2011, 02:52:38 PM by JeffVolp »
Logged
X-10 automation since the BSR days

JeffVolp

  • Moderator
  • Hero Member
  • *
  • Helpful Post Rating: 122
  • Posts: 2299
    • XTB Home Page
Re: XTBM Pro
« Reply #5 on: August 26, 2011, 02:50:28 PM »


An added feature I have been working on is the ability to show the actual powerline bit pattern.

For example, the simple command A [0110] ON [00101] when actually sent over the powerline becomes:

11 10 01 10 10 01 01 01 10 01 10

The first 4 bits are the start pattern, the next 8 are the "A", and the remainder are the "ON".

The XTBM Pro will be able to display the low-level bit pattern so you can see exactly what happens when the signal is corrupted by noise or a collision.

Jeff
Logged
X-10 automation since the BSR days

Alan V

  • Hero Member
  • *****
  • Helpful Post Rating: 8
  • Posts: 171
Re: XTBM Pro
« Reply #6 on: August 26, 2011, 03:12:49 PM »

It's ironic, since I've been using the 16LF1825.  To get a larger amount of uninterrupted linear memory, you would have to go with at least the 18 series.  Have you looked at those?  The lowest pin count package is 28-pin.  Probably more I/O than you need, but who cares?  They're less than a dollar more than the 16F1825.
Logged

JeffVolp

  • Moderator
  • Hero Member
  • *
  • Helpful Post Rating: 122
  • Posts: 2299
    • XTB Home Page
Re: XTBM Pro
« Reply #7 on: August 26, 2011, 04:27:49 PM »


It had to be pin-compatible with the 16F684 used in the XTBM.  The 182X series was supposed to be, but a restriction on the comparator configuration forced a change to the PCB so it could accept both devices.  The I/O is sufficient on the 14-pin device, and the 1K RAM is more than adequate.  Unfortunately, it is broken up into 80-byte segments, so I've been partitioning the workspace between the first two 2 banks.  The remainder will be used as the logging buffer, but that can be accessed indirectly as contiguous memory.

Jeff
Logged
X-10 automation since the BSR days

Alan V

  • Hero Member
  • *****
  • Helpful Post Rating: 8
  • Posts: 171
Re: XTBM Pro
« Reply #8 on: August 26, 2011, 05:01:41 PM »

Then I guess banking is not that much of an issue. :)
Logged

JeffVolp

  • Moderator
  • Hero Member
  • *
  • Helpful Post Rating: 122
  • Posts: 2299
    • XTB Home Page
Re: XTBM Pro
« Reply #9 on: August 27, 2011, 12:57:57 AM »

Then I guess banking is not that much of an issue. :)

That might seem so.  But just simply going through adding a banksel to every variable access would add hundreds of superfluous instructions.  So I’ve been going through all the variables deciding which should stay in Bank0, which could cleanly move to Bank1, and which should be global.  Unfortunately, that has been a time-consuming tedious process.

Jeff
Logged
X-10 automation since the BSR days

Alan V

  • Hero Member
  • *****
  • Helpful Post Rating: 8
  • Posts: 171
Re: XTBM Pro
« Reply #10 on: August 29, 2011, 03:33:48 PM »

Looks like you either live with bank switching, or spin the board to accept the 18 series part.
Logged

JeffVolp

  • Moderator
  • Hero Member
  • *
  • Helpful Post Rating: 122
  • Posts: 2299
    • XTB Home Page
Re: XTBM Pro
« Reply #11 on: November 07, 2011, 11:27:40 PM »


Some of you may be wondering why it is taking so long for the XTBM Pro to be released.

I have been working on the firmware in the little snippets of free time I have.  The task has been much more complex than originally envisioned because all the display code had to be grouped into independent subroutines, selected by the operating mode.  Previously the display was updated throughout the cycle as calculations were completed.  Reorganizing that code has been a nontrivial effort, and I'm still chasing bugs that were introduced in that process.

With tax time looming only a few months away, I may not get this completed before next summer.

Jeff
Logged
X-10 automation since the BSR days

JeffVolp

  • Moderator
  • Hero Member
  • *
  • Helpful Post Rating: 122
  • Posts: 2299
    • XTB Home Page
Re: XTBM Pro
« Reply #12 on: November 24, 2011, 01:22:02 PM »


A status update on the XTBM Pro:

I finally completed debugging the repartitioned code, and all the XTBM basic functions are operational again.  The mode selection code is operational, and I will be working on the enhancements in the coming weeks.

Several modifications will be ported over to the standard XTBM firmware in the next release early next year.  Some are obscure bug fixes, and one allows it to display the firmware version on the LCD.

Jeff
Logged
X-10 automation since the BSR days

JeffVolp

  • Moderator
  • Hero Member
  • *
  • Helpful Post Rating: 122
  • Posts: 2299
    • XTB Home Page
Re: XTBM Pro
« Reply #13 on: July 24, 2012, 09:48:02 PM »

As some of you know, I have been working on the XTBM Pro again, and hope to have it ready by fall.  Below are the added display modes:



Bargraph of last received X10 signal voltage and noise



Expanded noise with pre-window, X10 sample window, and post-window noise.



Bit pattern of both halves of X10 doublet with voltage of each underlined bit



Logging history since the unit was plugged in, including time stamps

(Yes, the Pro will be backlit.)

Jeff
Logged
X-10 automation since the BSR days

JeffVolp

  • Moderator
  • Hero Member
  • *
  • Helpful Post Rating: 122
  • Posts: 2299
    • XTB Home Page
Re: XTBM Pro
« Reply #14 on: September 09, 2012, 01:28:05 AM »

If anyone is interested, here is the first draft of the instructions:

http://jvde.us/xtb/XTBM-Pro_instructions.pdf

There are some formatting kinks to be worked out going from Word to HTML, but the content is there.  I would appreciate feedback if you find any errors.

(Yes, it is FINALLY available.)

Jeff

Update:  Document has been converted to PDF, which I hope cleans up the formatting errors for everyone.
« Last Edit: November 04, 2012, 12:21:10 AM by JeffVolp »
Logged
X-10 automation since the BSR days
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.