Close
0%
0%

Composino

CPLD is perfect for you? MCU is perfect for you? Both are put together!!

Similar projects worth following
Before I made a very easy CPLD prototyping board, where circuit implementation file (.svf) can be downloaded to CPLD through FTDI chip. Indeed 95288XL is enough large to implement relatively complex circuit (4-bit CPU and peripheral) but sometimes I got to know “easy operation” of ready-made CPU such as AVR ATMega. This time I made “Composino” consisting of Arduino compatible part and CPLD part, and those are internally connected and enables complex prototyping. MCU cannot be "device". CPLD cannot be (can be, but not optimised and multifunction) MCU. CPLD can be "device!" and MCU can handle SPI, I2C, A/D by single chip! Combination will make us happy!

  • Structure of “Composino”
    The above figure shows the configuration of Composino. D2 to D9 (Arduino naming) of ATMega328P is connected to XC9572XL from P1 to P12. Connecting A/D input to CPLD is not useful and those has direct output. In addition, SPI and I2C(included in A/D) has direct terminal on board. If some “SPI design by CPLD” is required, we can just connect D10 to D13 to XC9572XL pins by jumper wires.

Confirmation of basic operation by 7-segment LCD driver

Actually SPI and I2C of ATMega328 is still alive and we gain infinite (limited to CPLD cell size, though) possibility by this wonderful combination. Just to see its fundamental operation, 7-segment driver and counter is made in Composino. (Please note that simple LED segment driver is NOT at most what we can do by this board..) In this confirmation, CPLD part has simple source as follows:

module SEVENSEG(
    input [3:0] SW,
    output reg [7:0] nSEG
    );

always @* begin
	case( SW )
	4'h0: nSEG = 8'b11000000;
	4'h1: nSEG = 8'b11111001;
	4'h2: nSEG = 8'b10100100;
	4'h3: nSEG = 8'b10110000;
	4'h4: nSEG = 8'b10011001;
	4'h5: nSEG = 8'b10010010;
	4'h6: nSEG = 8'b10000010;
	4'h7: nSEG = 8'b11011000;
	4'h8: nSEG = 8'b10000000;
	4'h9: nSEG = 8'b10010000;
	4'ha: nSEG = 8'b10001000;
	4'hb: nSEG = 8'b10000011;
	4'hc: nSEG = 8'b11000110;
	4'hd: nSEG = 8'b10100001;
	4'he: nSEG = 8'b10000110;
	4'hf: nSEG = 8'b10001110;
	default:nSEG=8'bxxxxxxxx;
	endcase
end
endmodule

with following .ucf file
NET "nSEG<0>" LOC="P34";
NET "nSEG<1>" LOC="P33";
NET "nSEG<2>" LOC="P32";
NET "nSEG<3>" LOC="P31";
NET "nSEG<4>" LOC="P30";
NET "nSEG<5>" LOC="P29";
NET "nSEG<6>" LOC="P28";
NET "nSEG<7>" LOC="P27";

NET "SW<0>" LOC="P1";
NET "SW<1>" LOC="P2";
NET "SW<2>" LOC="P3";
NET "SW<3>" LOC="P5";
These source realising 7-segment LED driver, where “P1”, "P2”, “P3” “P5” are binary input and segment out are P27 to P34. As mentioned,

P1 to P5 are connected to D2 to D5, and binary number is generated by following Arduino source,

void setup() {
  for(int i=2;i<9;i++){
  pinMode(i, OUTPUT);
  }
}

void loop() {
  byte count;
  boolean a, b, c, d;
  for(count=0; count<17;count++){
    a=count&0b0001;
    b=(count&0b0010)>>1;
    c=(count&0b0100)>>2;
    d=(count&0b1000)>>3;
    digitalWrite(2, a);
    digitalWrite(3, b);
    digitalWrite(4, c);
    digitalWrite(5, d);
    delay(2000);
  }
}

The actual operation can be found in the following movie… Have fun!

default.svf

svn file generated by .v and .ucf files

svf - 196.13 kB - 01/31/2016 at 14:22

Download

Composino_test1.ino

Arduino sketch to see operation (counter)

ino - 407.00 bytes - 01/31/2016 at 14:22

Download

SEVENSEG.ucf

ucf file for 7seg driver

ucf - 300.00 bytes - 01/31/2016 at 14:22

Download

SEVENSEG.v

seven segment LED sample

v - 1.08 kB - 01/31/2016 at 14:21

Download

Composino.sch

Eagle schematic

sch - 452.41 kB - 01/31/2016 at 14:21

See BOM
Download

View all 6 files

  • Component information

    kodera2t08/01/2016 at 11:04 0 comments

    Thank you for supporting my creation activity. I started to sell Composino at tindie.com but I've forgot to clarify capacitance values in composino. Here is the information:

    I just use five capacitors and one resister. Except for DTR line, all the capacitors are 1uF and only one resistor is 10k. Thank you!!

View project log

Enjoy this project?

Share

Discussions

Harry Svensson wrote 07/16/2016 at 14:03 point

That pcb layout gave me cancer. 
Reason: 90 degree angles => ouch.

  Are you sure? yes | no

kodera2t wrote 07/16/2016 at 23:43 point

So sorry for that.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates