Assignment #5 / Project #2: Serial IO

  • user warning: Can't open file: 'cache.MYI' (errno: 145) query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'schema' in /var/www/vhosts/mattalltech.com/httpdocs/includes/cache.inc on line 26.
  • user warning: Can't open file: 'cache.MYI' (errno: 145) query: UPDATE cache SET data = 'a:50:{s:6:\"blocks\";a:7:{s:11:\"description\";s:62:\"Stores block settings, such as region and visibility settings.\";s:6:\"fields\";a:13:{s:3:\"bid\";a:3:{s:4:\"type\";s:6:\"serial\";s:8:\"not null\";b:1;s:11:\"description\";s:29:\"Primary Key: Unique block ID.\";}s:6:\"module\";a:5:{s:4:\"type\";s:7:\"varchar\";s:6:\"length\";i:64;s:8:\"not null\";b:1;s:7:\"default\";s:0:\"\";s:11:\"description\";s:126:\"The module from which the block originates; for example, \'user\' for the Who\'s Online block, and \'block\' for any custom blocks.\";}s:5:\"delta\";a:5:{s:4:\"type\";s:7:\"varchar\";s:6:\"length\";i:32;s:8:\"not null\";b:1;s:7:\"default\";s:1 in /var/www/vhosts/mattalltech.com/httpdocs/includes/cache.inc on line 109.
  • user warning: Can't open file: 'cache.MYI' (errno: 145) query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'theme_registry:mattalltech' in /var/www/vhosts/mattalltech.com/httpdocs/includes/cache.inc on line 26.
  • user warning: Can't open file: 'cache.MYI' (errno: 145) query: UPDATE cache SET data = 'a:127:{s:24:\"block_admin_display_form\";a:7:{s:8:\"template\";s:38:\"modules/block/block-admin-display-form\";s:4:\"file\";s:29:\"modules/block/block.admin.inc\";s:9:\"arguments\";a:1:{s:4:\"form\";N;}s:4:\"type\";s:6:\"module\";s:10:\"theme path\";s:13:\"modules/block\";s:11:\"theme paths\";a:1:{i:0;s:13:\"modules/block\";}s:20:\"preprocess functions\";a:2:{i:0;s:19:\"template_preprocess\";i:1;s:44:\"template_preprocess_block_admin_display_form\";}}s:17:\"color_scheme_form\";a:6:{s:9:\"arguments\";a:1:{s:4:\"form\";N;}s:4:\"type\";s:6:\"module\";s:10:\"theme path\";s:13:\"modules/color\";s:8:\"function\";s:23:\"theme_color_scheme_form\";s:11:\"theme paths\";a in /var/www/vhosts/mattalltech.com/httpdocs/includes/cache.inc on line 109.

Due: Oct. 28, 2008

Homework #5

Write a program to take single byte input data in the range of $00…$0F and print the corresponding character on the serial port. Print only one character from 0….F. In order to accomplish this, you have to include a routine to convert the input byte into the corresponding ASCII code.

Project #2

Include that routine into the keypad scan routine such that (the ASCII code representing) the key that is pressed get’s printed on the serial port.

Information and Resources

Page 85 of DBug12Manual.pdf contains DBug 12 functions ($EE84, $EE86, $EE9C) that we can use for purposes of getting and putting characters over serial I/O.

Page 400 of 9S12DP256 Processor.pdf discusses serial interface details.

Page 406 of 9S12DP256 Processor.pdf gives the data format diagram.

RDRF is basically the indicator when data is available on the serial interface.

  1. ******************************************************************************
  2. ************************* Put Character to Serial ****************************
  3. ******************************************************************************
  4. PChar: BRCLR SCI0SR1, $80, Pchar ; loop until transmit data register
  5. STAB SCI0DRL ; Send Character
  6. RTS ; Return from subroutine
  7.  
  8. ******************************************************************************
  9. ************************ Get Character From Serial ***************************
  10. ******************************************************************************
  11. GChar: BRCLR SCI0SR1, $20, GChar ; Loop until receive data register
  12. LDAB SCI0DRL ; Receive Character
  13. RTS ; Return from subroutine

AttachmentSize
ASCII DBug12.asm2.86 KB
EE 3362 HW5 _ PROJ2.doc23.5 KB

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
Either you're a spam bot or your not, now prove it!
Image CAPTCHA
Enter the characters shown in the image without spaces.