Help... I'm Stuck.. Communitcation between 28x2 and 20m2

sodeaf

Senior Member
Hey Guys.. I know what I am going to ask for.. Might not be possible but I will try and explain myself the best I can..

I have been in working on designing a 8 x 7 segment display controller (with "Marks" help).. 4 x 7 segments for a countdown clock and 4 x 7 segments for counting pulses... This is all running off a 28x2. I am left with a minimum amount of unused pins.. Actually only have 2 left.. There as a couple of inputs and outputs on the 28x2 board that are used to set up clock time and so on.. which I even had to use 3 switches on the ADC input to get this all to work.

So 28x2 chip for 8x7 segment display (considering it is controlling the displays, I cannot add any pause times.. There is a Pause 1 after each digit.. for a total of 8 x pause 1.. ) If i add any additional command that require a pause, the screen will start to blink. I can get away with maybe a pause 5, but that's about it..

I built a relay control board a couple months ago using a 20m2.. This board is being used to control a device that I am using the timer, and counter on. So I need the 2 chips to communicate. There is only 2 pins left on each chip.. The 20m2 Board has one output from a uln2803 and one input remaining.

When I originally built the counter, I was not concerned.. I thought I would use one input for "Start" and one "output" for a done command back to the 20m2.. Well how things change.. I need to send 3 signals from the 20m2 to the 28x2 at different times..

Is there a easy way tot do this? I was thinking of using the ADCOUT from the 20m2 to the 28x2 and readADC... I could just program 3 different values.. so the 28x2 could scan inputs and when it sees the change in ADC then It would react to that? Would that work? Any other suggestions?

28x2 Needs to send the following to 20M2 (only 2 pins free)
1. Started Counting
2. Time is done
3. Ready to Start

20M2 needs to send the following to 28x2 (only 2 pins free)
1. Pause Timer
2. Add to count
3. Ready to start

So I have one input and one output on each chip... and have to keep the

I am a newbie at all this... Just started in the last couple months using program editor.. (Started in Logicator)

Thanks...

Steve
 

nick12ab

Senior Member
I was thinking of using the ADCOUT from the 20m2 to the 28x2 and readADC... I could just program 3 different values.. so the 28x2 could scan inputs and when it sees the change in ADC then It would react to that? Would that work?#
I don't see why not. The 20M2 has a DAC output so can be directly interfaced with the 28X2, but the 28X2 would have to use PWM + an RC network to generate a voltage.
 

hippy

Ex-Staff (retired)
The 20M2 has a DAC output so can be directly interfaced with the 28X2
Technically the DAC output should be buffered with an op-amp but it did seem to work straight into an 18M2 ADC. There's a bit of noise but the 32 levels can be identified.

Code:
#Picaxe 20M2
DacSetup %10100000
Do
  DacLevel b0
  b0 = b0 + 1 // 32
  Pause 1000
Loop
Code:
#Picaxe 18M2
#Terminal 4800
Do
  ReadAdc C.0, b0
  If b0 < b1 Or b0 > b2 Then
    SerTxd( #b0, " " )
    b1 = b0 Min 2   - 2
    b2 = b0 Max 253 + 2
  End If
Loop
 
Top