I-V characteristics of resonant tunneling devices: Difference equation method