Joe Haas

How do you force byte writes to memory using CW?

Discussion created by Joe Haas on Feb 23, 2006
Latest reply on Feb 24, 2006 by bigmac
I am using the following code segment to write a data byte to an absolute memory location, held in "address" :
*(uint8 *)(address) = (uint8)data;
uint8 is defined as follows:
typedef unsigned short int uint8;
The problem is, the code is doing word (16 bit) memory accesses.  What am I doing wrong?

Message Edited by nanoGeek on 02-23-200609:59 AM

Message Edited by nanoGeek on 02-23-200610:00 AM