Search the Community

Showing results for tags 'ADC plotter'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Community
    • Gadget Factory Reboot 2022
    • Gadget Factory
    • Documentation
    • FPGA Discussions
    • Community Projects
  • Soft Processors
    • Migen/LiteX/Risc-V
    • ZPUino
    • J1 Forth
    • AVR8 Soft Processor
  • Electronics
    • Modules
  • Papilio Platform (Retired)
    • Papilio General Discussion
    • Papilio Pro
    • Papilio One
    • Papilio DUO
    • Papilio Wings
    • DesignLab IDE
    • DesignLab Libraries
    • RetroCade Synth
    • Papilio Arcade
    • Papilio Loader Application
    • Papilio Logic Sniffer
    • Pipistrello
    • Retired
  • Open Bench (Retired)
    • Open Bench Logic Sniffer at Dangerous Prototypes
    • OpenBench Logic Sniffer at Gadget Factory
  • GadgetBox Universal IoT Hardware (Retired)
    • GadgetBox General Discussion
  • Gadget Factory Internal Category


  • Papilio Platform
    • Papilio One
    • Papilio Plus
    • Papilio Wings
    • LogicStart MegaWing
    • ZPUino
    • Papilio Pro
  • Papilio Arcade
  • RetroCade Synth
  • Logic Sniffer
  • FPGAs
  • DesignLab
    • Example Projects
    • Libraries


  • Papilio FPGA
    • Papilio UCF (User Constraint) Files
    • Papilio Bit Files
  • Papilio Arcade
  • RetroCade Synth
  • General
  • Beta (Test) Releases
  • Books

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 1 result

  1. Hello, I wrote a simple script in Matlab that will use the serial com port to create a plot (16 bit plot). Currently works with offroad's bitfile. Since I can't upload the file, I will place the code here: portnum = input('What COM port is it (i.e. COM4 type 4)?') %Asks a numberrate=input('What Baudrate is it? (Default is 9600 (type 1))')if sum(rate) rate=9600endTimePeriod=input('What time period? (Default 400)')portstr=num2str(portnum)port=['COM',portstr]hold off;s1=serial(port,'Baudrate',rate); %puts parameters on serial portfopen(s1); %opens the serial portarray=fscanf(s1,'%c'); %starts listening. instantous readings pin0=[1:TimePeriod]; %Initliaze vectors for each ADC pinpin1=[1:TimePeriod];pin2=[1:TimePeriod];pin3=[1:TimePeriod];pin4=[1:TimePeriod];pin5=[1:TimePeriod];pin6=[1:TimePeriod];pin7=[1:TimePeriod];pin8=[1:TimePeriod];pin9=[1:TimePeriod];pin10=[1:TimePeriod];pin11=[1:TimePeriod];pin12=[1:TimePeriod];pin13=[1:TimePeriod];pin14=[1:TimePeriod];pin15=[1:TimePeriod];i=1;while i<TimePeriod array=fscanf(s1,'%c'); %Outputs a character line of the Hex values from the two ADCs Hexpin0=array([1:2]); %Hex values from first input Hexpin1=array([4:5]); Hexpin2=array([7:8]); Hexpin3=array([10:11]); Hexpin4=array([13:14]); Hexpin5=array([17:18]); Hexpin6=array([20:21]); Hexpin7=array([23:24]); Hexpin8=array([26:27]); Hexpin9=array([29:30]); Hexpin10=array([32:33]); Hexpin11=array([35:36]); Hexpin12=array([38:39]); Hexpin13=array([41:42]); Hexpin14=array([44:45]); Hexpin15=array([46:47]); Intpin0=hex2dec(Hexpin0); %Converted the Hex values to Integers Intpin1=hex2dec(Hexpin1); Intpin2=hex2dec(Hexpin2); Intpin3=hex2dec(Hexpin3); Intpin4=hex2dec(Hexpin4); Intpin5=hex2dec(Hexpin5); Intpin6=hex2dec(Hexpin6); Intpin7=hex2dec(Hexpin7); Intpin8=hex2dec(Hexpin8); Intpin9=hex2dec(Hexpin9); Intpin10=hex2dec(Hexpin10); Intpin11=hex2dec(Hexpin11); Intpin12=hex2dec(Hexpin12); Intpin13=hex2dec(Hexpin13); Intpin14=hex2dec(Hexpin14); Intpin15=hex2dec(Hexpin15); pin0(i)=Intpin0; %Vector of intgers from ADC's first input pin1(i)=Intpin1; pin2(i)=Intpin2; pin3(i)=Intpin3; pin4(i)=Intpin4; pin5(i)=Intpin5; pin6(i)=Intpin6; pin7(i)=Intpin7; pin8(i)=Intpin8; pin9(i)=Intpin9; pin10(i)=Intpin10; pin11(i)=Intpin11; pin12(i)=Intpin12; pin13(i)=Intpin13; pin14(i)=Intpin14; pin15(i)=Intpin15; i=i+1;end x=[1:TimePeriod]; plot(x,pin0,'y'); %Plot the first analog input hold on plot(x,pin1,'m') plot(x,pin2,'c') plot(x,pin3,'r') plot(x,pin4,'g') plot(x,pin5,'b') plot(x,pin6,'w') plot(x,pin7,'k') plot(x,pin8,'y-*') plot(x,pin9,'m-*') plot(x,pin10,'c-*') plot(x,pin11,'r-*') plot(x,pin12,'g-*') plot(x,pin13,'b-*') plot(x,pin14,'w-*') plot(x,pin15,'k-*') fclose(s1);