취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

fpga to generate pulse train and counter

해결 완료!
솔루션으로 이동

Hi,

 

I have some experience with Quartus, but new to the NI FPGA.

 

I have a PCI-7811R. I am trying to use it to sequentially light up 144 LEDs repetitively. The period of each pulse is 480us. 

 

Basically, I need to generate a pulse generator and a counter to record the pulse number, and according to this number, select which LED is on.

 

I designed a pulse train generator based on a example from FPGA help, and added a counter in it. You can see it in the attached vi.

 

My question is,

When I put the I/O node inside the single-cycle timed loops, it can generate the correct pulse.  However, when I tried to use the local variable to transfer data out of the SCTL, and then connect it to another I/O node, I cannot detect the pulse signal when I measured this I/O.

Is there something wrong with my code when I try to transfer data out of the SCTL? Can I also use local variable to transfer the counter value, because I will need it in the following part.

 

Thank you!

 

 

0 포인트
1/2 메시지
3,143 조회수
솔루션
주제 작성자 bluerunner이(가) 승인함

If you're referring to the local variable wired to DIO2 in your attached VI, the problem is very simple: it's outside a loop, so it only executes once.  Put that local variable and the IO node in a loop and I think you'll get something close to the pulse you expect (although if it's not in a single-cycle loop you may not get exactly the same timing).

2/2 메시지
3,136 조회수