Sunday, October 2, 2022

Bread Board PBX (BB_PBX) - Ring Generator

 I am working on a PICAXE ring generator for the BB_PBX. Since the SLIC modules require two pins with signal timings to ring them, I can reduce the I/O pins needed from the PIC32 and simplify the software too.

The PICAXE 08M2 chip will generate 20 Hz ringing signal on pin 5 C.2 and the ring mode signal on pin 6 C.1. The PICAXE is also taking care of the ring cadence (ringing then silence then ringing, etc.) and signal timing. This will no longer need to be handled in a software, so a single I/O pin connect to for example - Ring1 line brought high to start ringing line 1, etc.

The logic gates connected to the PICAXE route the ringing to one of 3 SLIC modules (technically possible to ring all lines if needed). It is also connected to the SHK (Hook) of the SLIC module so it will kill ringing when the phone goes off hook instantly, since with the software there could be delays.


Here is the PICAXE Blockly code for the ringer.



FTDI Picaxe programmer

 I needed to build a simple logic block for my Bread Board PBX to simplify the software and decided to use one of the PICAXE micro-controllers for a ring generator.

I had a couple of the small 8-Pin 08M2 chips already in my supplies, so I started to dig through my cables to find the special cable to use with the old AXE029 bread adapter to program the devices. It has been a while since I last programmed one, and I was using it via serial COM port cable the last time I did this and was not using the newer PICAXE USB cable that they have to connect to the adapter. Long story short, I could not get it to work. It may be a driver issue or because I am using the newer 8-Pin device now.

Anyway, I did some quick googling to see if I program a PICAXE with one of my other serial devices like my USB FTDI adapter HERE. The answer is yes!

Here is the minimal circuiy found HERE



But, I found using the FTDI 3.3v version the TX pin can go directly to pin3 without the resistor network and the RX to pin 7. And the PICAXE is being powered by the FTDI module too!

So, the setup just reduces to the following, but there is one more step required.


It turns out that the RX and TX signals need to be inverted to program the PICAXE. This is not a problem since there is a tool to make that change for you at FTDICHIP.com it is call FT_PROG (Windows).

Unzip FTProg tool, and run FT_PROG.exe.  Select Devices >> Scan and Parse, or just hit F5.

Your FTDI device will show up in the device tree.  click the + next to Hardware_Specific, then click on Invert_RS232_Signals.  Check the first 4 properties;

Invert TXD

Invert RXD

Invert RTS#

Invert CTS#

Click Devices >> Program or just hit CTRL + P

The Program Devices Dialog will appear.  Check the device to program, then click Program. 

This is very quick, but remember once you do this step, it will remain this way so, if you need to use it for something else you will need to revert this change.

As an alternative, you could use two inverters from a CD4049 hex inverter chip on the TX/RX lines and then you would not need the FTDI to be reprogrammed. I have not tested this yet, but it should work.





Wednesday, September 21, 2022

Bread Board PBX (BB_PBX)

I have been experimenting with the construction of a simple telephone Private Branch Exchange (PBX) using ready made telephony, audio WAV/MP3 players,and DTMF decoder modules built on a set of bread boards. You could probably buy a small PBX but what is more fun than building your own and writing the software to drive it?

The modules are connected to a Micromite PIC32 microcontroller that is running an embedded BASIC called MMBasic. I am using the 28 Pin PIC32 Micromite. I am very amazed by it capabilities.

To make it easier to develop on the BB_PBX I have a ESP8266 D1 Mini connected to the serial console of the PIC32 and am running ESP-LINK: Wifi-Serial Bridge firmware. This allows me to telnet to the BB_PBX and use the built-in editor on the Micromite to edit the code on my PC.



I don't have much working yet but I have developed most of the BASIC subroutines to make it work. I have exercised the ringing and control of the telephony modules, pulse dialing, and control of the SDCard audio player.

See my github for more detail on the code and modules