On Thu, May 5, 2011 at 12:59 PM, V G wrote: > Here is my (short and simple) Verilog code to make an array of LEDs blink= .. > It works. > > http://pastebin.com/guQcNkwp > > But note that in the module, the LED array is declared as an output reg. > Initially, I tried to use an output wire because I thought a "wire" was > necessary to route a signal to a pin or something. But then I got an erro= r > so I changed it to reg and it works, but I don't know why. I don't really > understand how the register is being routed to the pins of the LEDs. > > I don't *really* understand the difference between a wire and reg, and no= ne > of the books I've been reading explain that. Can anyone help? I am a beginner as well (and my object is more modest than you -- just to learn some ABCs, not going to do coding). I think the following URL has a good explanation. http://www.asic-world.com/tidbits/wire_reg.html --=20 Xiaofan --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .