Forum Discussion
Altera_Forum
Honored Contributor
17 years agoHello,
I have a problem with the flash, too. I want to write an HEX-Code to the flash and after changing the position of the switch I want to read the code from the flash and give it out at the LED's. It have to be a simple programm for testing how I can work with the flash. I use the DE2-70 board with cyclone II an the flash is: S29GL064A90TFIR4 Here is my code: module TE1 ( Adress, Data, CE, OE, WE, WP, RESET, BYTE, LED, SW_OE, SW_WE, LEDG, LEDG2, LEDG3, CLK_50 ); input CLK_50; output [21:0] Adress; output CE; output OE; output WE; output WP; output RESET; output BYTE; output SW_OE; output SW_WE; output [15:0] LED; output LEDG; output LEDG2; output LEDG3; inout [15:0] Data; reg [15:0] LED; reg LEDG; reg LEDG2; reg LEDG3; reg [15:0] Data; reg OE; reg WE; assign Adress = 22'h000001; assign CE = 0; assign WP = 1; assign RESET = 1; assign BYTE = 1; always @(posedge CLK_50) begin if ((SW_OE == 0)) begin OE <= SW_OE; WE <= !SW_OE; Data <= 16'hBDE7; LEDG <= 1; end else if ((SW_OE == 1)) begin OE <= SW_OE; WE <= !SW_OE; LED <= Data; LEDG2 <= 1; end else LEDG3 <= 1; end endmodule when I load the programm at the board LEDG lights up an after changing the switch position nothing happens. The LEDG's are only to show where the programm stopps. Why did nothing else happen after changing the position of the switch?any idea? I'm from germany so say something if you dont understand what I mean!^^ thanks