(* SLdt 241024 Disclaimer: none. Sue me. Ansprechen von AVR-UPDI per PC: RESET ausloesen Anschluss PC.Rx -------------- UPDI PC.Tx -- R ---|<|--- UPDI 100 Si-D free pascal *) // nur Auszug: SerSetParams(com_handle, 115200, 8, evenParity, 2, com_flags); c_tmp:= char($FE); // > 200 ns low com_status:= SerWrite(com_handle, c_tmp, 1); // RESET: c_tmp:= char($55); // sync com_status:= SerWrite(com_handle, c_tmp, 1); c_tmp:= char($C8); // STCS ASI_RESET_REQ com_status:= SerWrite(com_handle, c_tmp, 1); c_tmp:= char($59); // RESET com_status:= SerWrite(com_handle, c_tmp, 1); sleep(4000); // RESET 4 s lang halten // RUN: c_tmp:= char($55); // sync com_status:= SerWrite(com_handle, c_tmp, 1); c_tmp:= char($C8); // STCS ASI_RESET_REQ com_status:= SerWrite(com_handle, c_tmp, 1); c_tmp:= char($00); // RUN com_status:= SerWrite(com_handle, c_tmp, 1); // UPDI-Verbindung korrekt beenden: c_tmp:= char($55); // sync com_status:= SerWrite(com_handle, c_tmp, 1); c_tmp:= char($C3); // STCS CTRLB com_status:= SerWrite(com_handle, c_tmp, 1); c_tmp:= char($0C); // CCDETDIS | UPDIDIS com_status:= SerWrite(com_handle, c_tmp, 1);