* Nikkei edges up in thin trade, yen caps gains
* Holding above 25-day moving average at 9,600 seen key
* U.S. economy hopes war with worry after Bernanke comments
* Semiconductor wafer shares up after report of higher prices
By Elaine Lies
TOKYO, July 22 (Reuters) - Japan's Nikkei stock average edged up 0.2 percent in thin trade on Wednesday as chip-related stocks such as Shin-Etsu Chemical <4063.T> climbed, but gains were capped by investors eager to take profits ahead of Japanese corporate earnings.
Exporters such as Canon Inc <7751.T> were shaky and many lost ground due to a slightly stronger yen that rose after remarks by Federal Reserve Chairman Ben Bernanke.
The benchmark Nikkei <
> spent much of the morning in negative territory, but falls were countered by growing optimism about a recovery in the U.S. economy after a spate of strong earnings reports."At this point I think most people are expecting an economic recovery, the issue now is just whether they think it will happen quickly or gradually," said Tomomi Yamashita, a fund manager at Shinkin Asset Management.
The main U.S. share indexes rose on Tuesday, buoyed by solid profits at Caterpillar Inc <CAT.N>, but gains were limited by investor caution after a recent earnings-fuelled rise as well as a warning by Caterpillar that the current quarter will be tough.
Bernanke said in testimony before a congressional panel that mounting joblessness, slumping home values and tight credit were likely to curb consumer spending -- a major driver of U.S. economic growth. [
]Market analysts said there was growing concern that stocks may be overdue for some selling after five straight days of gains to Tuesday that saw the Nikkei rise 6.7 percent, and there was a sense U.S. markets could be overextended as well. "It wouldn't be at all surprising at this point for U.S. stocks to dip, and investors are holding back from buying as a result," said Yutaka Miura, a senior technical analyst at Mizuho Securities.
S&P 500 futures <SPc1> edged down 0.2 percent.
The benchmark Nikkei <
> gained 15.67 points to 9,667.69 after closing at a two-week high on Tuesday. The broader Topix < > edged up 0.2 percent to 903.59.Analysts said one key technical level for the Nikkei was 9,600, just under where the 25-day moving average comes in, and that a break below this could signal a period of downward adjustment.
The 25-day moving average for the Topix is now just over 900, with the broader index managing to break above this just before the close of morning trade.
EDGY EXPORTERS
Shin-Etsu Chemical, a top maker of semiconductor wafers, climbed 5.1 percent to 4,750 yen, becoming one of the top contributors to the Nikkei 225, after the Nikkei business daily said its unit Shin-Etsu Handotai is in talks to raise the price of 300 mm wafers 30-40 percent. [
]Rival Sumco Corp <3436.T>, which the Nikkei said could follow soon, gained 4.5 percent to 1,577 yen.
Otherwise, gains centred on a range of defensive shares such as seasoning maker Ajinomoto <2802.T>, which rose 3.7 percent to 823 yen.
Sapporo Holdings <2501.T> rose 3.3 percent to 557 yen after the Nikkei business daily reported on Wednesday that the brewer apparently broke even in January-June, beating the company's own forecast for an operating loss of 2 billion yen ($21.4 million).
The dollar was down 0.1 percent against the Japanese currency at 93.61 yen <JPY=> but off earlier lows.
Sony Corp <6758.T> lost 0.9 percent to 2,295 yen, Canon fell 1.6 percent to 3,150 yen, and Advantest Corp <6857.T> dropped 1.8 percent to 1,752 yen.
Shippers fell after the Baltic Exchange's main sea freight index <.BADI>, which tracks rates to ship dry commodities, fell 1.6 percent on Tuesday as more vessel availability weighed on recent gains.
Mitsui O.S.K. Lines <9104.T> lost 1.3 percent to 598 yen.
Trade slowed on the Tokyo exchange's first section, with 959 million shares changing hands, compared with last week's morning average of 1 billion.
Advancing shares outpaced declining ones by 996 to 555. (Reporting by Elaine Lies; Editing by Edwina Gibbs)