Menu

Multiple table storage question/suggestions

Ben Omlor
2024-03-05
2024-03-07
  • Ben Omlor

    Ben Omlor - 2024-03-05

    Hi,
    We manufacture pilot-controlled lighting receivers. Basically, the pilot goes to a set frequency clicks the mic and the runway lights turn on. The receiver board is made with a PIC16LF18455 controlling a SI5351A Crystal emulator ic to set the IF and Test Frequency. To set those frequency's a table is created in clock builder pro and saved into the program. This requires us to know the needed frequency ahead of time and program the chip for only that frequency.
    I would like to make a future board with field adjustment capabilities. There are 760 different frequency's in the aviation band. I was thinking a 10 pos dip switch for selecting frequency, but I will need to be able to store and select from 760 different tables.
    Before I headed down the wrong path and begged for help, I thought it might be helpful to see if anyone had been down this road before and had any suggestions. I know the chip has some internal eeprom storage, but I am assuming a external eeprom would be required for this many tables.

    Table example is below.

        Table FreqTab     ;CH0-Vhf freq - 10.7;CH1-Rec freq test osc;CH2-*Uhf-129.0 IF (if used)
    

    ;Paste Frequency TABLE here table_size must be set (2 per line) on line # 44
    ;Register Address(HEX),Data(HEX)

    0x0002, 0x13
    0x0003, 0x02
    0x0004, 0x00
    0x0007, 0x00
    0x000F, 0x00
    0x0010, 0x6E
    0x0011, 0x4C
    0x0012, 0x8C
    0x0013, 0x8C
    0x0014, 0x8C
    0x0015, 0x8C
    0x0016, 0x8C
    0x0017, 0x8C
    0x001A, 0x00
    0x001B, 0x2D
    0x001C, 0x00
    0x001D, 0x0B
    0x001E, 0xA4
    0x001F, 0x00
    0x0020, 0x00
    0x0021, 0x2C
    0x0022, 0x34
    0x0023, 0xBC
    0x0024, 0x00
    0x0025, 0x0E
    0x0026, 0x9B
    0x0027, 0x00
    0x0028, 0x1B
    0x0029, 0xAC
    0x002A, 0x00
    0x002B, 0x01
    0x002C, 0x00
    0x002D, 0x02
    0x002E, 0x00
    0x002F, 0x00
    0x0030, 0x00
    0x0031, 0x00
    0x0032, 0x00
    0x0033, 0x01
    0x0034, 0x00
    0x0035, 0x01
    0x0036, 0x00
    0x0037, 0x00
    0x0038, 0x00
    0x0039, 0x00
    0x005A, 0x00
    0x005B, 0x00
    0x0095, 0x00
    0x0096, 0x00
    0x0097, 0x00
    0x0098, 0x00
    0x0099, 0x00
    0x009A, 0x00
    0x009B, 0x00
    0x00A2, 0x00
    0x00A3, 0x00
    0x00A4, 0x00
    0x00A5, 0x00
    0x00A6, 0x00
    0x00B7, 0x92

    ;the values below work with all freq.s
    177, 0xAC ;soft reset

    End Table

    I appreciate any thoughts or suggestions.
    Thanks,
    Ben

     
  • Anobium

    Anobium - 2024-03-05

    Great question.

    Well 760 tables, each of 60 rows, each row has two words, is that 178k bytes? If yes, then you will require external memory ( SPI is recommended ).

    Then, you would need to create a simple lookup routine to load a single table into RAM. But, your chosen chip is RAM constrained. Change it to something with more RAM ?

    You could random access the external memory via SPI but as I do not understand what the solution really does it is hard to advise.

     
  • Ben Omlor

    Ben Omlor - 2024-03-05

    Thanks for the reply!
    I will need to change the micro anyways to have enough I/O pins for the 10 pos dip switch.
    I was looking at a 40 pin PIC16F18877. after going down the rabbit hole of bits and bytes relating to eeproms it looks like I would need a 2mbit eeprom to hold the data. Looks like a M95M02-DRMN6TP would fit the bill.
    Do you see any incompatibility's that would make either chip not up to the task?
    I must admit by background is way more electronics than programming, but I am excited to up my game and get a test board designed to play around with.
    Just want to try to make sure I am not starting in the hole with incompatible chips or some other glaring problem that should have been obvious.

    The goal is for the end user to be able to select the desired frequency via dip switch settings and have the micro select and feed the correct table into the SI chip.

    Thanks again,
    Ben

     
    • Anobium

      Anobium - 2024-03-06

      Requirements should drive the selection of the microcontroller.

      External memory. I would recommend a Microchip device. As the library to drive will have been tested.
      10 pos dip switch. Interface via a 4017. This is interfaces via 2 ports.
      From a solution point of view. You will need to read these tables into RAM. So, lots of RAM required.

      What else ? Display ? Inputs?

      I would be looking at the PIC18FxxQ series. You may be able to use the DMA feature to make the external memory load directly into the RAM.

       
  • Geoffrey Younger

    Hi Ben,
    I would look at something like a quad rotary encoder to sub-divide your large table
    into manageable chuncks - either decimal or hex - The user dials up the table number
    and hits a GO button. Adafruit make such a device -product # 5752 that only uses two
    pins ! It is an I2C device meant for the Arduino market. Since GCBasic handles most AVR
    devices with aplomb, it should not be too difficult.
    I have also devised a BCD thumwheel/Hex switch interface that uses just One uC pin with
    adc capability, so all you would require is 3 or 4 pins for a 0 to 999 selection.
    How you present the user interface is the nub of your project.
    Regards
    Geoffrey Younger

     
  • Ben Omlor

    Ben Omlor - 2024-03-07

    Thank You!
    You guys are awsome! I didn't even think to search for the Si chip to see if anyone had been down this road before. Modifying the table parameters instead of loading all the tables individually is defiantly the easier path.
    I am going to get a test board made up to play with. I am going to try the 10 pin dip with the 4017 for the input. I am trying to avoid using a lcd panel. For the most parts these things will only be set at first install and very rarely changed.
    If anybody's interested, the pilot-controlled lighting systems we make can been seen at.
    www.controlindustriesinc.com

    I'll update with progress as I hopefully get her going :-)

    Ben

     

Log in to post a comment.