Writing frame data