pic18f1220dip18.test 784 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh
  2. test_init()
  3. {
  4. request_DUT "pic18f1220dip18" || return 1
  5. return 0
  6. }
  7. test_run()
  8. {
  9. # Check signature
  10. toprammer --read-sig "$tmpfile"
  11. compare_file_to_hex "$tmpfile" "E707" || die "signature mismatch"
  12. toprammer --erase
  13. # Check progmem
  14. toprammer --write-prog "$testfile_4k"
  15. toprammer --read-prog "$tmpfile"
  16. compare_files "$testfile_4k" "$tmpfile" || die "progmem mismatch"
  17. # Check EEPROM
  18. toprammer --write-eeprom "$testfile_256"
  19. toprammer --read-eeprom "$tmpfile"
  20. compare_files "$testfile_256" "$tmpfile" || die "EEPROM mismatch"
  21. # Check fuses
  22. testfuses="00CF 0F1F 0080 8500 03C0 03E0 0340"
  23. echo "0x0000: $testfuses" | toprammer -I ahex --write-fuse -
  24. toprammer --read-fuse "$tmpfile"
  25. compare_file_to_hex "$tmpfile" "$testfuses" || die "fuses mismatch"
  26. }