예제 #1
0
        static void Main(string[] args)
        {
            var Interpreter = new Atmega328Interpreter();

            Interpreter.Load(IntelHEX.Parse("Blink.hex"));
            //Interpreter.PORTB.PB5.ValueChanged += new EventHandler<AVRInterpreter.GPIOPinValueChangedEventArgs>(PB5_ValueChanged);
            Interpreter.Execute();
        }
예제 #2
0
        private void Worker_DoWork(object sender, DoWorkEventArgs e)
        {
            this.Interpreter = new Atmega328Interpreter();

            /*this.Interpreter.Load(
             *      IntelHEX.Parse(@"C:\Users\Tom\Documents\Atmel Studio\Projects\Blink\Debug\Blink.hex"),
             *      IntelHEX.Parse(@"C:\Users\Tom\Documents\Atmel Studio\Projects\Blink\Debug\Blink.eep")
             *      );*/

            this.Interpreter.Load(IntelHEX.Parse("Blink.hex"));

            this.Interpreter.PORTB.PB5.ValueChanged += new EventHandler <AVRInterpreter.GPIOPinValueChangedEventArgs>(this.PB5_ValueChanged);

            for (; !this.Worker.CancellationPending;)
            {
                this.Interpreter.Execute();
            }
        }