Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

nexys 3 FPGA board with PmodBT2

Status
Not open for further replies.

Fazeel Ayaz

Newbie level 1
Joined
Apr 1, 2015
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
7
Hi I am new here.I want to send data to a output pin of nexys 3 using PmodBT2 to interface between android app Blue term. What I want to do is to switch on and off LED at the out put pin of nexy's 3 from my mobile phone.
 

Ok and what is the problem your facing?
 

I want to know what would be the status of pins like RTS , CTS for reliable transfer of data from my mobile phone to the FPGA board.
I tried with a code that I made myself but it doesn't work ,however when I send $$$ and other commands to the module it responds.
The problem is I am not able to send the data to the TX pin of Pmod or else there is problem in the code.
I have checked the code with the clock frequency 100MHz that was equal to the fpga board clock and it works fine when simulated.I set (~RST) pin = 1, CTS =1, am I doing wrong?
Please help me.

This the verilog code:



Code Verilog - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 19:29:26 04/13/2015
//////////////////////////////////////////////////////////////
module Uart_Rec(clk,Rx,PMODBT_RST,output2);
input clk;
input Rx;
output reg [7:0]output2;
output PMODBT_RST;
 
 
reg [9:0]Reg_a=10'b1111111111;
reg alpha=0;
reg [3:0]i=4'b0000;
reg e=0;
reg [9:0]counter=10'b1000001001;
 
assign PMODBT_RST=1;
 
 
always @(posedge clk) begin
output2 = (Reg_a[9] == 1 && Reg_a[0]==0 ) ? Reg_a[8:1] :output2;
if (e==1) begin
if (counter < 10'b1000001001) begin counter=counter+1'b1; end
else begin counter=0; end
alpha = (counter==0) ? (~alpha):alpha;
 
end
e= (Rx==0)? 1'b1:e;
e= (i> 5'b1001) ? 1'b0:e;
counter = (e==0) ? 8'b11111111:counter;
end
 
 
always @( posedge alpha) begin
if(e>0 && i<10) begin
Reg_a[i]=Rx;
i=i+1'b1; end
i= (i> 5'b1001) ? 4'b0000:i;
end
 
endmodule

 
Last edited by a moderator:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top