I am trying to use the Altera DE0-nano to communication with the PC. I am using the ttl-232R-3v3 cable, currently it transmit 8 bits data once, but with the cable, it can be 1 bit a time transmit. How do I do it?
I have finish the 8 bit code:
type ST = BitVector 28
example :: ( ST , ST ) -> BitVector 8 -> (( ST , ST ) , BitVector 8)
example ( cntr1 , cntr2 ) input = ((cntr1’,cntr2’) , out)
where
sec_5 = 250000000
ascii_Y = 0x59 --ASCII for "Y" yes
ascii_N = 0x4E --ASCII for "N" no
cntr1’ | cntr1 >= sec_5 = 0 --At 50 MHz : 5 seconds
| otherwise = cntr1 + 1
cntr2’ = cntr2
out | input == maxBound = ascii_Y
| otherwise = ascii_Y
Here is the output:
